Index: chrome/browser/devtools/devtools_window.h |
diff --git a/chrome/browser/devtools/devtools_window.h b/chrome/browser/devtools/devtools_window.h |
index c3eea26bc43d1afd4d3b331e6493a0fce5e53b6a..57b211e03fc04209b699d12c3254e188c1e6adf2 100644 |
--- a/chrome/browser/devtools/devtools_window.h |
+++ b/chrome/browser/devtools/devtools_window.h |
@@ -45,13 +45,16 @@ class DevToolsWindow : public DevToolsUIBindings::Delegate, |
static DevToolsWindow* GetInstanceForInspectedWebContents( |
content::WebContents* inspected_web_contents); |
- // Return the DevToolsWindow for the given WebContents if one exists and is |
- // docked, otherwise NULL. This method will return only fully initialized |
- // window ready to be presented in UI. |
+ // Return the DevTools WebContents for the given inspected WebContents |
+ // if one exists and should be shown in browser window, otherwise NULL. |
+ // This method will return only fully initialized window ready to be |
+ // presented in UI. |
+ // If |out_strategy| is not NULL, it will contain resizing strategy. |
// For immediately-ready-to-use but maybe not yet fully initialized DevTools |
// use |GetInstanceForInspectedRenderViewHost| instead. |
- static DevToolsWindow* GetDockedInstanceForInspectedTab( |
- content::WebContents* inspected_tab); |
+ static content::WebContents* GetWebContentsToShowForInspectedTab( |
pfeldman
2014/05/27 15:26:19
I find the old name a better match.
dgozman
2014/05/29 11:22:23
We don't return instance anymore. Changed to GetIn
|
+ content::WebContents* inspected_tab, |
+ DevToolsContentsResizingStrategy* out_strategy); |
static bool IsDevToolsWindow(content::RenderViewHost* window_rvh); |
@@ -89,18 +92,8 @@ class DevToolsWindow : public DevToolsUIBindings::Delegate, |
static void InspectElement( |
content::RenderViewHost* inspected_rvh, int x, int y); |
- content::WebContents* web_contents() { return web_contents_; } |
- |
- Browser* browser() { return browser_; } // For tests. |
- |
- // Inspected WebContents is placed over DevTools WebContents in docked mode. |
- // The following method returns the resizing strategy of inspected |
- // WebContents relative to DevTools WebContents. |
- const DevToolsContentsResizingStrategy& GetContentsResizingStrategy() const; |
- |
- // Minimum size of the docked DevTools WebContents. This includes |
- // the overlaying inspected WebContents size. |
- gfx::Size GetMinimumSize() const; |
+ Browser* browser_for_test() { return browser_; } |
+ content::WebContents* web_contents_for_test() { return main_web_contents_; } |
// Sets closure to be called after load is done. If already loaded, calls |
// closure immediately. |
@@ -241,6 +234,11 @@ class DevToolsWindow : public DevToolsUIBindings::Delegate, |
const gfx::Rect& initial_pos, |
bool user_gesture, |
bool* was_blocked) OVERRIDE; |
+ virtual void WebContentsCreated(content::WebContents* source_contents, |
+ int opener_render_frame_id, |
+ const base::string16& frame_name, |
+ const GURL& target_url, |
+ content::WebContents* new_contents) OVERRIDE; |
virtual void CloseContents(content::WebContents* source) OVERRIDE; |
virtual void ContentsZoomChange(bool zoom_in) OVERRIDE; |
virtual void BeforeUnloadFired(content::WebContents* tab, |
@@ -291,13 +289,15 @@ class DevToolsWindow : public DevToolsUIBindings::Delegate, |
void LoadCompleted(); |
void SetIsDockedAndShowImmediatelyForTest(bool is_docked); |
void UpdateBrowserToolbar(); |
+ void UpdateBrowserWindow(); |
content::WebContents* GetInspectedWebContents(); |
class InspectedWebContentsObserver; |
scoped_ptr<InspectedWebContentsObserver> inspected_contents_observer_; |
Profile* profile_; |
- content::WebContents* web_contents_; |
+ content::WebContents* main_web_contents_; |
+ content::WebContents* toolbox_web_contents_; |
DevToolsUIBindings* bindings_; |
Browser* browser_; |
bool is_docked_; |