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

Unified Diff: chrome/browser/debugger/devtools_window.h

Issue 7778010: DevTools: split DevToolsHandler into client and agent handlers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use private inheritance for observer interfaces Created 9 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
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/debugger/devtools_window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/debugger/devtools_window.h
diff --git a/chrome/browser/debugger/devtools_window.h b/chrome/browser/debugger/devtools_window.h
index 6565bf6a765060839581175f2f4e4c217bac6f51..4b02e96453b969e5ccdf4c0347a16947ebf54604 100644
--- a/chrome/browser/debugger/devtools_window.h
+++ b/chrome/browser/debugger/devtools_window.h
@@ -10,8 +10,10 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
#include "chrome/browser/debugger/devtools_toggle_action.h"
#include "content/browser/debugger/devtools_client_host.h"
+#include "content/browser/renderer_host/render_view_host_observer.h"
#include "content/browser/tab_contents/tab_contents_delegate.h"
#include "content/common/notification_observer.h"
#include "content/common/notification_registrar.h"
@@ -33,8 +35,9 @@ class Value;
class DevToolsWindow
: public DevToolsClientHost,
- public NotificationObserver,
- public TabContentsDelegate {
+ private NotificationObserver,
+ private TabContentsDelegate,
+ private RenderViewHostObserver {
public:
static const char kDevToolsApp[];
static void RegisterUserPrefs(PrefService* prefs);
@@ -54,11 +57,6 @@ class DevToolsWindow
virtual void InspectedTabClosing();
virtual void TabReplaced(TabContents* new_tab);
virtual RenderViewHost* GetClientRenderViewHost();
- virtual void RequestActivate();
- virtual void RequestSetDocked(bool docked);
- virtual void RequestClose();
- virtual void RequestSaveAs(const std::string& suggested_file_name,
- const std::string& content);
RenderViewHost* GetRenderViewHost();
void Show(DevToolsToggleAction action);
@@ -68,8 +66,11 @@ class DevToolsWindow
bool is_docked() { return docked_; }
private:
- DevToolsWindow(Profile* profile, RenderViewHost* inspected_rvh, bool docked,
- bool shared_worker_frontend);
+ static DevToolsWindow* Create(Profile* profile,
+ RenderViewHost* inspected_rvh,
+ bool docked, bool shared_worker_frontend);
+ DevToolsWindow(TabContentsWrapper* tab_contents, Profile* profile,
+ RenderViewHost* inspected_rvh, bool docked);
void CreateDevToolsBrowser();
bool FindInspectedBrowserAndTabIndex(Browser**, int* tab);
@@ -84,7 +85,8 @@ class DevToolsWindow
void ScheduleAction(DevToolsToggleAction action);
void DoAction();
- GURL GetDevToolsUrl();
+ static GURL GetDevToolsUrl(Profile* profile, bool docked,
+ bool shared_worker_frontend);
void UpdateTheme();
void AddDevToolsExtensionsToClient();
void CallClientFunction(const string16& function_name,
@@ -118,6 +120,19 @@ class DevToolsWindow
DevToolsToggleAction action);
static DevToolsWindow* AsDevToolsWindow(DevToolsClientHost*);
+ // RenderViewHostObserver overrides.
+ virtual void RenderViewHostDestroyed() OVERRIDE;
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+
+ void OnForwardToAgent(const IPC::Message& message);
+ void OnActivateWindow();
+ void OnCloseWindow();
+ void OnRequestDockWindow();
+ void OnRequestUndockWindow();
+ void OnSaveAs(const std::string& file_name,
+ const std::string& content);
+ void RequestSetDocked(bool docked);
+
Profile* profile_;
TabContentsWrapper* inspected_tab_;
TabContentsWrapper* tab_contents_;
@@ -125,7 +140,6 @@ class DevToolsWindow
bool docked_;
bool is_loaded_;
DevToolsToggleAction action_on_load_;
- const bool shared_worker_frontend_;
NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(DevToolsWindow);
};
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/debugger/devtools_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698