| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 class DevToolsWindow | 37 class DevToolsWindow |
| 38 : public DevToolsClientHost, | 38 : public DevToolsClientHost, |
| 39 private content::NotificationObserver, | 39 private content::NotificationObserver, |
| 40 private TabContentsDelegate, | 40 private TabContentsDelegate, |
| 41 private RenderViewHostObserver { | 41 private RenderViewHostObserver { |
| 42 public: | 42 public: |
| 43 static const char kDevToolsApp[]; | 43 static const char kDevToolsApp[]; |
| 44 static void RegisterUserPrefs(PrefService* prefs); | 44 static void RegisterUserPrefs(PrefService* prefs); |
| 45 static TabContentsWrapper* GetDevToolsContents(TabContents* inspected_tab); | 45 static TabContentsWrapper* GetDevToolsContents(TabContents* inspected_tab); |
| 46 static DevToolsWindow* FindDevToolsWindow(RenderViewHost* window_rvh); | |
| 47 | 46 |
| 48 static DevToolsWindow* OpenDevToolsWindowForWorker( | 47 static DevToolsWindow* OpenDevToolsWindowForWorker( |
| 49 Profile* profile, | 48 Profile* profile, |
| 50 DevToolsAgentHost* worker_agent); | 49 DevToolsAgentHost* worker_agent); |
| 51 static DevToolsWindow* CreateDevToolsWindowForWorker(Profile* profile); | 50 static DevToolsWindow* CreateDevToolsWindowForWorker(Profile* profile); |
| 52 static DevToolsWindow* OpenDevToolsWindow(RenderViewHost* inspected_rvh); | 51 static DevToolsWindow* OpenDevToolsWindow(RenderViewHost* inspected_rvh); |
| 53 static DevToolsWindow* ToggleDevToolsWindow(RenderViewHost* inspected_rvh, | 52 static DevToolsWindow* ToggleDevToolsWindow(RenderViewHost* inspected_rvh, |
| 54 DevToolsToggleAction action); | 53 DevToolsToggleAction action); |
| 55 static void InspectElement(RenderViewHost* inspected_rvh, int x, int y); | 54 static void InspectElement(RenderViewHost* inspected_rvh, int x, int y); |
| 56 | 55 |
| 57 virtual ~DevToolsWindow(); | 56 virtual ~DevToolsWindow(); |
| 58 | 57 |
| 59 // Overridden from DevToolsClientHost. | 58 // Overridden from DevToolsClientHost. |
| 60 virtual void SendMessageToClient(const IPC::Message& message) OVERRIDE; | 59 virtual void SendMessageToClient(const IPC::Message& message) OVERRIDE; |
| 61 virtual void InspectedTabClosing() OVERRIDE; | 60 virtual void InspectedTabClosing() OVERRIDE; |
| 62 virtual void TabReplaced(TabContents* new_tab) OVERRIDE; | 61 virtual void TabReplaced(TabContents* new_tab) OVERRIDE; |
| 63 virtual RenderViewHost* GetClientRenderViewHost() OVERRIDE; | |
| 64 RenderViewHost* GetRenderViewHost(); | 62 RenderViewHost* GetRenderViewHost(); |
| 65 | 63 |
| 66 void Show(DevToolsToggleAction action); | 64 void Show(DevToolsToggleAction action); |
| 67 | 65 |
| 68 TabContentsWrapper* tab_contents() { return tab_contents_; } | 66 TabContentsWrapper* tab_contents() { return tab_contents_; } |
| 69 Browser* browser() { return browser_; } // For tests. | 67 Browser* browser() { return browser_; } // For tests. |
| 70 bool is_docked() { return docked_; } | 68 bool is_docked() { return docked_; } |
| 71 | 69 |
| 72 private: | 70 private: |
| 73 static DevToolsWindow* Create(Profile* profile, | 71 static DevToolsWindow* Create(Profile* profile, |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 TabContentsWrapper* tab_contents_; | 142 TabContentsWrapper* tab_contents_; |
| 145 Browser* browser_; | 143 Browser* browser_; |
| 146 bool docked_; | 144 bool docked_; |
| 147 bool is_loaded_; | 145 bool is_loaded_; |
| 148 DevToolsToggleAction action_on_load_; | 146 DevToolsToggleAction action_on_load_; |
| 149 content::NotificationRegistrar registrar_; | 147 content::NotificationRegistrar registrar_; |
| 150 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); | 148 DISALLOW_COPY_AND_ASSIGN(DevToolsWindow); |
| 151 }; | 149 }; |
| 152 | 150 |
| 153 #endif // CHROME_BROWSER_DEBUGGER_DEVTOOLS_WINDOW_H_ | 151 #endif // CHROME_BROWSER_DEBUGGER_DEVTOOLS_WINDOW_H_ |
| OLD | NEW |