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

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

Issue 13305002: Remove redundant DevToolsManager methods and clean up its clients. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_DEVTOOLS_DEVTOOLS_WINDOW_H_ 5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_
6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ 6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 DevToolsToggleAction action); 75 DevToolsToggleAction action);
76 static void InspectElement( 76 static void InspectElement(
77 content::RenderViewHost* inspected_rvh, int x, int y); 77 content::RenderViewHost* inspected_rvh, int x, int y);
78 78
79 virtual ~DevToolsWindow(); 79 virtual ~DevToolsWindow();
80 80
81 // Overridden from DevToolsClientHost. 81 // Overridden from DevToolsClientHost.
82 virtual void InspectedContentsClosing() OVERRIDE; 82 virtual void InspectedContentsClosing() OVERRIDE;
83 content::RenderViewHost* GetRenderViewHost(); 83 content::RenderViewHost* GetRenderViewHost();
84 84
85 void Hide();
pfeldman 2013/03/29 14:59:23 I'd place Hide under Show.
Vladislav Kaznacheev 2013/03/29 15:15:35 Done.
85 void Show(DevToolsToggleAction action); 86 void Show(DevToolsToggleAction action);
86 87
87 content::WebContents* web_contents() { return web_contents_; } 88 content::WebContents* web_contents() { return web_contents_; }
88 Browser* browser() { return browser_; } // For tests. 89 Browser* browser() { return browser_; } // For tests.
89 DevToolsDockSide dock_side() { return dock_side_; } 90 DevToolsDockSide dock_side() { return dock_side_; }
90 91
91 content::DevToolsClientHost* GetDevToolsClientHostForTest(); 92 content::DevToolsClientHost* GetDevToolsClientHostForTest();
92 93
93 // Returns preferred devtools window width for given |container_width|. It 94 // Returns preferred devtools window width for given |container_width|. It
94 // tries to use the saved window width, or, if none exists, 1/3 of the 95 // tries to use the saved window width, or, if none exists, 1/3 of the
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 virtual void HandleKeyboardEvent( 165 virtual void HandleKeyboardEvent(
165 content::WebContents* source, 166 content::WebContents* source,
166 const content::NativeWebKeyboardEvent& event) OVERRIDE; 167 const content::NativeWebKeyboardEvent& event) OVERRIDE;
167 virtual content::JavaScriptDialogManager* 168 virtual content::JavaScriptDialogManager*
168 GetJavaScriptDialogManager() OVERRIDE; 169 GetJavaScriptDialogManager() OVERRIDE;
169 virtual void RunFileChooser( 170 virtual void RunFileChooser(
170 content::WebContents* web_contents, 171 content::WebContents* web_contents,
171 const content::FileChooserParams& params) OVERRIDE; 172 const content::FileChooserParams& params) OVERRIDE;
172 virtual void WebContentsFocused(content::WebContents* contents) OVERRIDE; 173 virtual void WebContentsFocused(content::WebContents* contents) OVERRIDE;
173 174
174 static DevToolsWindow* AsDevToolsWindow(content::DevToolsClientHost*); 175 static DevToolsWindow* AsDevToolsWindow(content::DevToolsAgentHost*);
pfeldman 2013/03/29 14:59:23 "AsDevToolsWindow" name does not make sense now.
Vladislav Kaznacheev 2013/03/29 15:15:35 Done.
175 static DevToolsWindow* AsDevToolsWindow(content::RenderViewHost*); 176 static DevToolsWindow* AsDevToolsWindow(content::RenderViewHost*);
176 177
177 // content::DevToolsFrontendHostDelegate overrides. 178 // content::DevToolsFrontendHostDelegate overrides.
178 virtual void ActivateWindow() OVERRIDE; 179 virtual void ActivateWindow() OVERRIDE;
179 virtual void ChangeAttachedWindowHeight(unsigned height) OVERRIDE; 180 virtual void ChangeAttachedWindowHeight(unsigned height) OVERRIDE;
180 virtual void CloseWindow() OVERRIDE; 181 virtual void CloseWindow() OVERRIDE;
181 virtual void MoveWindow(int x, int y) OVERRIDE; 182 virtual void MoveWindow(int x, int y) OVERRIDE;
182 virtual void SetDockSide(const std::string& side) OVERRIDE; 183 virtual void SetDockSide(const std::string& side) OVERRIDE;
183 virtual void OpenInNewTab(const std::string& url) OVERRIDE; 184 virtual void OpenInNewTab(const std::string& url) OVERRIDE;
184 virtual void SaveToFile(const std::string& url, 185 virtual void SaveToFile(const std::string& url,
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 content::NotificationRegistrar registrar_; 219 content::NotificationRegistrar registrar_;
219 scoped_ptr<content::DevToolsClientHost> frontend_host_; 220 scoped_ptr<content::DevToolsClientHost> frontend_host_;
220 base::WeakPtrFactory<DevToolsWindow> weak_factory_; 221 base::WeakPtrFactory<DevToolsWindow> weak_factory_;
221 scoped_ptr<DevToolsFileHelper> file_helper_; 222 scoped_ptr<DevToolsFileHelper> file_helper_;
222 int width_; 223 int width_;
223 int height_; 224 int height_;
224 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); 225 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow);
225 }; 226 };
226 227
227 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ 228 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698