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

Unified Diff: chrome/browser/devtools/device/webrtc/devtools_bridge_client.h

Issue 791083005: Browser tests for DevToolsBridgeClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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/devtools/device/webrtc/devtools_bridge_client.h
diff --git a/chrome/browser/devtools/device/webrtc/devtools_bridge_client.h b/chrome/browser/devtools/device/webrtc/devtools_bridge_client.h
index e8a137377ea9a92ace881e1f075f6e8166230aeb..c6d36f15203590f583cc863545c7986b7c251dd9 100644
--- a/chrome/browser/devtools/device/webrtc/devtools_bridge_client.h
+++ b/chrome/browser/devtools/device/webrtc/devtools_bridge_client.h
@@ -28,10 +28,10 @@ class GCDApiFlow;
} // local_discovery
// Lives on the UI thread.
-class DevToolsBridgeClient final
- : private content::NotificationObserver,
+class DevToolsBridgeClient
+ : protected content::WebContentsObserver,
+ private content::NotificationObserver,
private IdentityProvider::Observer,
- private content::WebContentsObserver,
private SendCommandRequest::Delegate,
private DevToolsBridgeInstancesRequest::Delegate {
public:
@@ -56,17 +56,26 @@ class DevToolsBridgeClient final
content::WebContents* web_contents);
void RegisterMessageHandlers(content::WebUI* web_ui);
- private:
+ protected:
DevToolsBridgeClient(Profile* profile,
SigninManagerBase* signin_manager,
ProfileOAuth2TokenService* token_service);
- ~DevToolsBridgeClient();
+ // Implementation of content::WebContentsObserver.
+ void DocumentOnLoadCompletedInMainFrame() override;
+
+ ~DevToolsBridgeClient() override;
bool IsAuthenticated();
+ // Overridden in tests.
+ virtual scoped_ptr<local_discovery::GCDApiFlow> CreateGCDApiFlow();
+ virtual void OnBrowserListUpdatedForTests() {}
+ const BrowserInfoList& browsers() const { return browsers_; }
dgozman 2014/12/22 17:08:38 nit: please insert blank line before these, as the
SeRya 2014/12/22 17:14:42 Done.
+ ProfileIdentityProvider& identity_provider() { return identity_provider_; }
+
+ private:
void CreateBackgroundWorker();
- scoped_ptr<local_discovery::GCDApiFlow> CreateGCDApiFlow();
void UpdateBrowserList();
void HandleSendCommand(const base::ListValue* args);
@@ -75,9 +84,6 @@ class DevToolsBridgeClient final
void OnActiveAccountLogin() override;
void OnActiveAccountLogout() override;
- // Implementation of WebContentsObserver.
- void DocumentOnLoadCompletedInMainFrame() override;
-
// Implementation of NotificationObserver.
void Observe(int type,
const content::NotificationSource& source,

Powered by Google App Engine
This is Rietveld 408576698