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

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
« no previous file with comments | « no previous file | chrome/browser/devtools/device/webrtc/devtools_bridge_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..701e6dbb24c183ab9b5a923857625d60f810c610 100644
--- a/chrome/browser/devtools/device/webrtc/devtools_bridge_client.h
+++ b/chrome/browser/devtools/device/webrtc/devtools_bridge_client.h
@@ -28,12 +28,11 @@ class GCDApiFlow;
} // local_discovery
// Lives on the UI thread.
-class DevToolsBridgeClient final
- : private content::NotificationObserver,
- private IdentityProvider::Observer,
- private content::WebContentsObserver,
- private SendCommandRequest::Delegate,
- private DevToolsBridgeInstancesRequest::Delegate {
+class DevToolsBridgeClient : protected content::WebContentsObserver,
+ private content::NotificationObserver,
+ private IdentityProvider::Observer,
+ private SendCommandRequest::Delegate,
+ private DevToolsBridgeInstancesRequest::Delegate {
public:
using BrowserInfo = AndroidDeviceManager::BrowserInfo;
using DeviceInfo = AndroidDeviceManager::DeviceInfo;
@@ -56,17 +55,27 @@ 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_; }
+ 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,
« no previous file with comments | « no previous file | chrome/browser/devtools/device/webrtc/devtools_bridge_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698