Chromium Code Reviews| 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_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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 123 int GetHeight(int container_height); | 123 int GetHeight(int container_height); |
| 124 | 124 |
| 125 // Stores preferred devtools window width for this instance. | 125 // Stores preferred devtools window width for this instance. |
| 126 void SetWidth(int width); | 126 void SetWidth(int width); |
| 127 | 127 |
| 128 // Stores preferred devtools window height for this instance. | 128 // Stores preferred devtools window height for this instance. |
| 129 void SetHeight(int height); | 129 void SetHeight(int height); |
| 130 | 130 |
| 131 void Show(const DevToolsToggleAction& action); | 131 void Show(const DevToolsToggleAction& action); |
| 132 | 132 |
| 133 static bool HandleBeforeUnload(content::WebContents*, bool, bool*); | |
|
jeremy
2013/11/07 14:18:34
This needs a comment, how about something like:
I
jeremy
2013/11/07 14:18:34
Why no variable names in header? Also, these func
lushnikov
2013/11/07 17:18:10
Done.
lushnikov
2013/11/07 17:18:10
Done.
| |
| 134 static bool InterceptPageBeforeUnload(content::WebContents*); | |
| 135 static bool ShouldCloseDevToolsBrowser(Browser*); | |
| 136 static bool NeedToFireBeforeUnload(content::WebContents*); | |
| 137 static void PageClosingCanceled(content::WebContents*); | |
| 138 | |
| 139 void SetDockSideForTest(DevToolsDockSide dock_side); | |
| 140 | |
| 133 private: | 141 private: |
| 134 friend class DevToolsControllerTest; | 142 friend class DevToolsControllerTest; |
| 135 | 143 |
| 136 DevToolsWindow(Profile* profile, | 144 DevToolsWindow(Profile* profile, |
| 137 const GURL& frontend_url, | 145 const GURL& frontend_url, |
| 138 content::RenderViewHost* inspected_rvh, | 146 content::RenderViewHost* inspected_rvh, |
| 139 DevToolsDockSide dock_side); | 147 DevToolsDockSide dock_side); |
| 140 | 148 |
| 141 static DevToolsWindow* Create(Profile* profile, | 149 static DevToolsWindow* Create(Profile* profile, |
| 142 const GURL& frontend_url, | 150 const GURL& frontend_url, |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 274 scoped_ptr<DevToolsFileHelper> file_helper_; | 282 scoped_ptr<DevToolsFileHelper> file_helper_; |
| 275 scoped_refptr<DevToolsFileSystemIndexer> file_system_indexer_; | 283 scoped_refptr<DevToolsFileSystemIndexer> file_system_indexer_; |
| 276 typedef std::map< | 284 typedef std::map< |
| 277 int, | 285 int, |
| 278 scoped_refptr<DevToolsFileSystemIndexer::FileSystemIndexingJob> > | 286 scoped_refptr<DevToolsFileSystemIndexer::FileSystemIndexingJob> > |
| 279 IndexingJobsMap; | 287 IndexingJobsMap; |
| 280 IndexingJobsMap indexing_jobs_; | 288 IndexingJobsMap indexing_jobs_; |
| 281 int width_; | 289 int width_; |
| 282 int height_; | 290 int height_; |
| 283 DevToolsDockSide dock_side_before_minimized_; | 291 DevToolsDockSide dock_side_before_minimized_; |
| 292 bool inspected_page_is_closing_; | |
| 284 | 293 |
| 285 scoped_ptr<DevToolsEmbedderMessageDispatcher> embedder_message_dispatcher_; | 294 scoped_ptr<DevToolsEmbedderMessageDispatcher> embedder_message_dispatcher_; |
| 286 base::WeakPtrFactory<DevToolsWindow> weak_factory_; | 295 base::WeakPtrFactory<DevToolsWindow> weak_factory_; |
| 287 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); | 296 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); |
| 288 }; | 297 }; |
| 289 | 298 |
| 290 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ | 299 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ |
| OLD | NEW |