Reland "[serial] Implement tab indicator triggered by open()"

This is a reland of 0ca38034e8e6daca423130b7643dae169a60692b

The tests were flaking because the tab indicator is only removed after the
browser process receives the Mojo connection error. To fix this the tests are
now unit tests where we can make sure to run the necessary message loop to make
sure that this event has been delivered before checking.

Original change's description:
> [serial] Implement tab indicator triggered by open()
>
> As long as there is an active connection between a frame in a tab and a
> serial port the tab should display an indicator.
>
> This is accomplished by adding an additional Mojo pipe that is kept open
> between the device service and the browser processes for as long as the
> render process has a connection to the port.
>
> Bug: 917204
> Change-Id: I6441070f3473bd6b4a98dae98844a89ee4eb2329
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1546502
> Reviewed-by: Scott Violet <[email protected]>
> Reviewed-by: Dominick Ng <[email protected]>
> Reviewed-by: Yuri Wiitala <[email protected]>
> Commit-Queue: Reilly Grant <[email protected]>
> Cr-Commit-Position: refs/heads/master@{#647109}

Bug: 917204
Change-Id: I26fbb51845ae6b7ce2fe54bad2cc0a271ce0cbd0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1555508
Reviewed-by: Dominick Ng <[email protected]>
Reviewed-by: Scott Violet <[email protected]>
Commit-Queue: Reilly Grant <[email protected]>
Cr-Commit-Position: refs/heads/master@{#649154}
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
index b33d118..6cf2ca2 100644
--- a/content/public/browser/web_contents.h
+++ b/content/public/browser/web_contents.h
@@ -474,6 +474,10 @@
   // Device.
   virtual bool IsConnectedToBluetoothDevice() = 0;
 
+  // Indicates whether any frame in the WebContents is connected to a serial
+  // port.
+  virtual bool IsConnectedToSerialPort() const = 0;
+
   // Indicates whether a video is in Picture-in-Picture for |this|.
   virtual bool HasPictureInPictureVideo() = 0;