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

Side by Side Diff: chrome/browser/debugger/devtools_window.h

Issue 8676032: Move RenderViewHostObserver to content/public/browser/ and put it into the content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add render_view_host.h to DEPS file Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_DEBUGGER_DEVTOOLS_WINDOW_H_ 5 #ifndef CHROME_BROWSER_DEBUGGER_DEVTOOLS_WINDOW_H_
6 #define CHROME_BROWSER_DEBUGGER_DEVTOOLS_WINDOW_H_ 6 #define CHROME_BROWSER_DEBUGGER_DEVTOOLS_WINDOW_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "chrome/browser/debugger/devtools_toggle_action.h" 14 #include "chrome/browser/debugger/devtools_toggle_action.h"
15 #include "content/browser/debugger/devtools_client_host.h" 15 #include "content/browser/debugger/devtools_client_host.h"
16 #include "content/browser/renderer_host/render_view_host_observer.h"
17 #include "content/browser/tab_contents/tab_contents_delegate.h" 16 #include "content/browser/tab_contents/tab_contents_delegate.h"
18 #include "content/public/browser/notification_observer.h" 17 #include "content/public/browser/notification_observer.h"
19 #include "content/public/browser/notification_registrar.h" 18 #include "content/public/browser/notification_registrar.h"
19 #include "content/public/browser/render_view_host_observer.h"
20 20
21 namespace IPC { 21 namespace IPC {
22 class Message; 22 class Message;
23 } 23 }
24 24
25 class Browser; 25 class Browser;
26 class BrowserWindow; 26 class BrowserWindow;
27 class DevToolsAgentHost; 27 class DevToolsAgentHost;
28 class PrefService; 28 class PrefService;
29 class Profile; 29 class Profile;
30 class RenderViewHost; 30 class RenderViewHost;
31 class TabContentsWrapper; 31 class TabContentsWrapper;
32 32
33 namespace base { 33 namespace base {
34 class Value; 34 class Value;
35 } 35 }
36 36
37 class DevToolsWindow 37 class DevToolsWindow : public DevToolsClientHost,
38 : public DevToolsClientHost, 38 private content::NotificationObserver,
39 private content::NotificationObserver, 39 private TabContentsDelegate,
40 private TabContentsDelegate, 40 private content::RenderViewHostObserver {
41 private RenderViewHostObserver {
42 public: 41 public:
43 static const char kDevToolsApp[]; 42 static const char kDevToolsApp[];
44 static void RegisterUserPrefs(PrefService* prefs); 43 static void RegisterUserPrefs(PrefService* prefs);
45 static TabContentsWrapper* GetDevToolsContents(TabContents* inspected_tab); 44 static TabContentsWrapper* GetDevToolsContents(TabContents* inspected_tab);
46 static bool IsDevToolsWindow(RenderViewHost* window_rvh); 45 static bool IsDevToolsWindow(RenderViewHost* window_rvh);
47 46
48 static DevToolsWindow* OpenDevToolsWindowForWorker( 47 static DevToolsWindow* OpenDevToolsWindowForWorker(
49 Profile* profile, 48 Profile* profile,
50 DevToolsAgentHost* worker_agent); 49 DevToolsAgentHost* worker_agent);
51 static DevToolsWindow* CreateDevToolsWindowForWorker(Profile* profile); 50 static DevToolsWindow* CreateDevToolsWindowForWorker(Profile* profile);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 virtual content::JavaScriptDialogCreator* 117 virtual content::JavaScriptDialogCreator*
119 GetJavaScriptDialogCreator() OVERRIDE; 118 GetJavaScriptDialogCreator() OVERRIDE;
120 119
121 virtual void FrameNavigating(const std::string& url) OVERRIDE {} 120 virtual void FrameNavigating(const std::string& url) OVERRIDE {}
122 121
123 static DevToolsWindow* ToggleDevToolsWindow(RenderViewHost* inspected_rvh, 122 static DevToolsWindow* ToggleDevToolsWindow(RenderViewHost* inspected_rvh,
124 bool force_open, 123 bool force_open,
125 DevToolsToggleAction action); 124 DevToolsToggleAction action);
126 static DevToolsWindow* AsDevToolsWindow(DevToolsClientHost*); 125 static DevToolsWindow* AsDevToolsWindow(DevToolsClientHost*);
127 126
128 // RenderViewHostObserver overrides. 127 // content::RenderViewHostObserver overrides.
129 virtual void RenderViewHostDestroyed(RenderViewHost* rvh) OVERRIDE; 128 virtual void RenderViewHostDestroyed(RenderViewHost* rvh) OVERRIDE;
130 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 129 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
131 130
132 void OnActivateWindow(); 131 void OnActivateWindow();
133 void OnCloseWindow(); 132 void OnCloseWindow();
134 void OnMoveWindow(int x, int y); 133 void OnMoveWindow(int x, int y);
135 void OnRequestDockWindow(); 134 void OnRequestDockWindow();
136 void OnRequestUndockWindow(); 135 void OnRequestUndockWindow();
137 void OnSaveAs(const std::string& file_name, 136 void OnSaveAs(const std::string& file_name,
138 const std::string& content); 137 const std::string& content);
139 void RequestSetDocked(bool docked); 138 void RequestSetDocked(bool docked);
140 139
141 Profile* profile_; 140 Profile* profile_;
142 TabContentsWrapper* inspected_tab_; 141 TabContentsWrapper* inspected_tab_;
143 TabContentsWrapper* tab_contents_; 142 TabContentsWrapper* tab_contents_;
144 Browser* browser_; 143 Browser* browser_;
145 bool docked_; 144 bool docked_;
146 bool is_loaded_; 145 bool is_loaded_;
147 DevToolsToggleAction action_on_load_; 146 DevToolsToggleAction action_on_load_;
148 content::NotificationRegistrar registrar_; 147 content::NotificationRegistrar registrar_;
149 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); 148 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow);
150 }; 149 };
151 150
152 #endif // CHROME_BROWSER_DEBUGGER_DEVTOOLS_WINDOW_H_ 151 #endif // CHROME_BROWSER_DEBUGGER_DEVTOOLS_WINDOW_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/webui_login_view.cc ('k') | chrome/browser/debugger/devtools_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698