OLD | NEW |
---|---|
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_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 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
80 // Overridden from DevToolsClientHost. | 80 // Overridden from DevToolsClientHost. |
81 virtual void InspectedContentsClosing() OVERRIDE; | 81 virtual void InspectedContentsClosing() OVERRIDE; |
82 virtual void ContentsReplaced(content::WebContents* new_contents) OVERRIDE; | 82 virtual void ContentsReplaced(content::WebContents* new_contents) OVERRIDE; |
83 content::RenderViewHost* GetRenderViewHost(); | 83 content::RenderViewHost* GetRenderViewHost(); |
84 | 84 |
85 void Show(DevToolsToggleAction action); | 85 void Show(DevToolsToggleAction action); |
86 | 86 |
87 TabContents* tab_contents() { return tab_contents_; } | 87 TabContents* tab_contents() { return tab_contents_; } |
88 Browser* browser() { return browser_; } // For tests. | 88 Browser* browser() { return browser_; } // For tests. |
89 DevToolsDockSide dock_side() { return dock_side_; } | 89 DevToolsDockSide dock_side() { return dock_side_; } |
90 content::DevToolsClientHost* devtools_client_host() { | 90 content::DevToolsClientHost* devtools_client_host() { return frontend_host_; } |
91 return frontend_host_; | 91 |
92 } | 92 // Returns preferred devtools window width for given |container_width|. |
Peter Kasting
2012/10/26 03:22:07
Nit: Add more detail, like "This tries to use the
pfeldman
2012/10/26 08:56:02
Done.
| |
93 // Called only for the case when devtools window is docked to the side. | |
94 int GetWidth(int container_width); | |
95 | |
96 // Returns preferred devtools window height for given |container_height|. | |
97 // Called only for the case when devtools window is docked to bottom. | |
98 int GetHeight(int container_height); | |
99 | |
100 // Stores preferred devtools window width for this instance. | |
101 void SetWidth(int width); | |
102 | |
103 // Stores preferred devtools window height for this instance. | |
104 void SetHeight(int height); | |
93 | 105 |
94 private: | 106 private: |
95 static DevToolsWindow* Create(Profile* profile, | 107 static DevToolsWindow* Create(Profile* profile, |
96 content::RenderViewHost* inspected_rvh, | 108 content::RenderViewHost* inspected_rvh, |
97 DevToolsDockSide dock_side, | 109 DevToolsDockSide dock_side, |
98 bool shared_worker_frontend); | 110 bool shared_worker_frontend); |
99 DevToolsWindow(TabContents* tab_contents, | 111 DevToolsWindow(TabContents* tab_contents, |
100 Profile* profile, | 112 Profile* profile, |
101 content::RenderViewHost* inspected_rvh, | 113 content::RenderViewHost* inspected_rvh, |
102 DevToolsDockSide dock_side); | 114 DevToolsDockSide dock_side); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
176 Profile* profile_; | 188 Profile* profile_; |
177 TabContents* inspected_tab_; | 189 TabContents* inspected_tab_; |
178 TabContents* tab_contents_; | 190 TabContents* tab_contents_; |
179 Browser* browser_; | 191 Browser* browser_; |
180 DevToolsDockSide dock_side_; | 192 DevToolsDockSide dock_side_; |
181 bool is_loaded_; | 193 bool is_loaded_; |
182 DevToolsToggleAction action_on_load_; | 194 DevToolsToggleAction action_on_load_; |
183 content::NotificationRegistrar registrar_; | 195 content::NotificationRegistrar registrar_; |
184 content::DevToolsClientHost* frontend_host_; | 196 content::DevToolsClientHost* frontend_host_; |
185 scoped_ptr<DevToolsFileHelper> file_helper_; | 197 scoped_ptr<DevToolsFileHelper> file_helper_; |
198 int width_; | |
199 int height_; | |
186 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); | 200 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); |
187 }; | 201 }; |
188 | 202 |
189 #endif // CHROME_BROWSER_DEBUGGER_DEVTOOLS_WINDOW_H_ | 203 #endif // CHROME_BROWSER_DEBUGGER_DEVTOOLS_WINDOW_H_ |
OLD | NEW |