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

Unified Diff: chrome/browser/devtools/devtools_ui_bindings.h

Issue 449043002: [DevTools] Make DevTools clients talk directly to DevToolsAgentHost instead of using DevToolsManage… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed DetachAllClients Created 6 years, 4 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/devtools/devtools_ui_bindings.h
diff --git a/chrome/browser/devtools/devtools_ui_bindings.h b/chrome/browser/devtools/devtools_ui_bindings.h
index 2c47ea7bde2507ab13ac5166b71da32036caf4ac..9205ca5a9bc38ed26ed00159689415f747507af7 100644
--- a/chrome/browser/devtools/devtools_ui_bindings.h
+++ b/chrome/browser/devtools/devtools_ui_bindings.h
@@ -17,7 +17,7 @@
#include "chrome/browser/devtools/devtools_file_helper.h"
#include "chrome/browser/devtools/devtools_file_system_indexer.h"
#include "chrome/browser/devtools/devtools_targets_ui.h"
-#include "content/public/browser/devtools_client_host.h"
+#include "content/public/browser/devtools_agent_host.h"
#include "content/public/browser/devtools_frontend_host.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -27,7 +27,6 @@ class InfoBarService;
class Profile;
namespace content {
-class DevToolsClientHost;
struct FileChooserParams;
class WebContents;
}
@@ -37,7 +36,7 @@ class DevToolsUIBindings : public content::NotificationObserver,
public content::DevToolsFrontendHost::Delegate,
public DevToolsEmbedderMessageDispatcher::Delegate,
public DevToolsAndroidBridge::DeviceCountListener,
- public content::DevToolsClientHost {
+ public content::DevToolsAgentHostClient {
public:
static GURL ApplyThemeToURL(Profile* profile, const GURL& base_url);
@@ -64,6 +63,7 @@ class DevToolsUIBindings : public content::NotificationObserver,
content::WebContents* web_contents() { return web_contents_; }
Profile* profile() { return profile_; }
+ content::DevToolsAgentHost* agent_host() { return agent_host_.get(); }
// Takes ownership over the |delegate|.
void SetDelegate(Delegate* delegate);
@@ -71,6 +71,11 @@ class DevToolsUIBindings : public content::NotificationObserver,
const base::Value* arg1,
const base::Value* arg2,
const base::Value* arg3);
+ void AttachTo(content::DevToolsAgentHost* agent_host);
+ void Reattach();
+ void Detach();
+ bool IsAttachedTo(content::DevToolsAgentHost* agent_host);
+
private:
// content::NotificationObserver overrides.
virtual void Observe(int type,
@@ -83,10 +88,13 @@ class DevToolsUIBindings : public content::NotificationObserver,
virtual void HandleMessageFromDevToolsFrontendToBackend(
const std::string& message) OVERRIDE;
- // content::DevToolsClientHost implementation.
- virtual void DispatchOnInspectorFrontend(const std::string& message) OVERRIDE;
- virtual void InspectedContentsClosing() OVERRIDE;
- virtual void ReplacedWithAnotherClient() OVERRIDE;
+ // content::DevToolsAgentHostClient implementation.
+ virtual void DispatchProtocolMessage(
+ content::DevToolsAgentHost* agent_host,
+ const std::string& message) OVERRIDE;
+ virtual void AgentHostClosed(
+ content::DevToolsAgentHost* agent_host,
+ bool replaced_with_another_client) OVERRIDE;
// DevToolsEmbedderMessageDispatcher::Delegate implementation.
virtual void ActivateWindow() OVERRIDE;
@@ -166,6 +174,7 @@ class DevToolsUIBindings : public content::NotificationObserver,
Profile* profile_;
content::WebContents* web_contents_;
scoped_ptr<Delegate> delegate_;
+ scoped_refptr<content::DevToolsAgentHost> agent_host_;
content::NotificationRegistrar registrar_;
scoped_ptr<content::DevToolsFrontendHost> frontend_host_;
scoped_ptr<DevToolsFileHelper> file_helper_;
« no previous file with comments | « chrome/browser/devtools/devtools_sanity_browsertest.cc ('k') | chrome/browser/devtools/devtools_ui_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698