Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1357)

Unified Diff: chrome/browser/usb/usb_tab_helper.h

Issue 1857033003: Implement tab indicator for WebUSB. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't try to update tab indicator on Android. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/usb/usb_tab_helper.h
diff --git a/chrome/browser/usb/usb_tab_helper.h b/chrome/browser/usb/usb_tab_helper.h
index 71eed596339a9b028c482c0252c01560d39ff503..bc9f7375c02c9f3739ce17725f23f044e8745a5d 100644
--- a/chrome/browser/usb/usb_tab_helper.h
+++ b/chrome/browser/usb/usb_tab_helper.h
@@ -42,6 +42,10 @@ class UsbTabHelper : public content::WebContentsObserver,
content::RenderFrameHost* render_frame_host,
mojo::InterfaceRequest<device::usb::ChooserService> request);
+ void IncrementConnectionCount();
+ void DecrementConnectionCount();
+ bool IsDeviceConnected() const;
+
private:
explicit UsbTabHelper(content::WebContents* web_contents);
friend class content::WebContentsUserData<UsbTabHelper>;
@@ -59,7 +63,10 @@ class UsbTabHelper : public content::WebContentsObserver,
content::RenderFrameHost* render_frame_host,
mojo::InterfaceRequest<device::usb::ChooserService> request);
+ void NotifyTabStateChanged() const;
+
FrameUsbServicesMap frame_usb_services_;
+ int device_connection_count_;
DISALLOW_COPY_AND_ASSIGN(UsbTabHelper);
};

Powered by Google App Engine
This is Rietveld 408576698