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

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

Issue 1228863006: devtools: avoid relying on the internal variables for browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add DetachFromBrowser() Created 5 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/devtools/devtools_window.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/devtools/devtools_contents_resizing_strategy.h" 8 #include "chrome/browser/devtools/devtools_contents_resizing_strategy.h"
9 #include "chrome/browser/devtools/devtools_toggle_action.h" 9 #include "chrome/browser/devtools/devtools_toggle_action.h"
10 #include "chrome/browser/devtools/devtools_ui_bindings.h" 10 #include "chrome/browser/devtools/devtools_ui_bindings.h"
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 void SetInspectedPageBounds(const gfx::Rect& rect) override; 290 void SetInspectedPageBounds(const gfx::Rect& rect) override;
291 void InspectElementCompleted() override; 291 void InspectElementCompleted() override;
292 void SetIsDocked(bool is_docked) override; 292 void SetIsDocked(bool is_docked) override;
293 void OpenInNewTab(const std::string& url) override; 293 void OpenInNewTab(const std::string& url) override;
294 void SetWhitelistedShortcuts(const std::string& message) override; 294 void SetWhitelistedShortcuts(const std::string& message) override;
295 void InspectedContentsClosing() override; 295 void InspectedContentsClosing() override;
296 void OnLoadCompleted() override; 296 void OnLoadCompleted() override;
297 InfoBarService* GetInfoBarService() override; 297 InfoBarService* GetInfoBarService() override;
298 void RenderProcessGone(bool crashed) override; 298 void RenderProcessGone(bool crashed) override;
299 299
300 void CreateDevToolsBrowser(); 300 Browser* CreateDevToolsBrowser();
301 BrowserWindow* GetInspectedBrowserWindow(); 301 BrowserWindow* GetInspectedBrowserWindow();
302 void ScheduleShow(const DevToolsToggleAction& action); 302 void ScheduleShow(const DevToolsToggleAction& action);
303 void Show(const DevToolsToggleAction& action); 303 void Show(const DevToolsToggleAction& action);
304 void DoAction(const DevToolsToggleAction& action); 304 void DoAction(const DevToolsToggleAction& action);
305 void LoadCompleted(); 305 void LoadCompleted();
306 void UpdateBrowserToolbar(); 306 void UpdateBrowserToolbar();
307 void UpdateBrowserWindow(); 307 void UpdateBrowserWindow();
308 Browser* GetBrowser();
309 bool IsDocked();
310 void DetachFromBrowser();
311
308 content::WebContents* GetInspectedWebContents(); 312 content::WebContents* GetInspectedWebContents();
309 313
310 scoped_ptr<ObserverWithAccessor> inspected_contents_observer_; 314 scoped_ptr<ObserverWithAccessor> inspected_contents_observer_;
311 315
312 Profile* profile_; 316 Profile* profile_;
313 content::WebContents* main_web_contents_; 317 content::WebContents* main_web_contents_;
314 content::WebContents* toolbox_web_contents_; 318 content::WebContents* toolbox_web_contents_;
315 DevToolsUIBindings* bindings_; 319 DevToolsUIBindings* bindings_;
316 Browser* browser_; 320 bool dock_requested_;
317 bool is_docked_;
318 const bool can_dock_; 321 const bool can_dock_;
319 LifeStage life_stage_; 322 LifeStage life_stage_;
320 DevToolsToggleAction action_on_load_; 323 DevToolsToggleAction action_on_load_;
321 DevToolsContentsResizingStrategy contents_resizing_strategy_; 324 DevToolsContentsResizingStrategy contents_resizing_strategy_;
322 // True if we're in the process of handling a beforeunload event originating 325 // True if we're in the process of handling a beforeunload event originating
323 // from the inspected webcontents, see InterceptPageBeforeUnload for details. 326 // from the inspected webcontents, see InterceptPageBeforeUnload for details.
324 bool intercepted_page_beforeunload_; 327 bool intercepted_page_beforeunload_;
325 base::Closure load_completed_callback_; 328 base::Closure load_completed_callback_;
326 base::Closure close_callback_; 329 base::Closure close_callback_;
327 330
328 base::TimeTicks inspect_element_start_time_; 331 base::TimeTicks inspect_element_start_time_;
329 scoped_ptr<DevToolsEventForwarder> event_forwarder_; 332 scoped_ptr<DevToolsEventForwarder> event_forwarder_;
330 333
331 friend class DevToolsEventForwarder; 334 friend class DevToolsEventForwarder;
332 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); 335 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow);
333 }; 336 };
334 337
335 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_ 338 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/devtools/devtools_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698