OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_TESTING_H_ | 5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_TESTING_H_ |
6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_TESTING_H_ | 6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_TESTING_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "chrome/browser/devtools/devtools_window.h" | 9 #include "chrome/browser/devtools/devtools_window.h" |
10 #include "ui/gfx/rect.h" | 10 #include "ui/gfx/rect.h" |
11 | 11 |
12 class Browser; | 12 class Browser; |
13 class Profile; | 13 class Profile; |
14 | 14 |
15 namespace content { | 15 namespace content { |
16 class DevToolsAgentHost; | 16 class DevToolsAgentHost; |
17 class RenderViewHost; | |
18 class WebContents; | 17 class WebContents; |
19 } | 18 } |
20 | 19 |
21 class DevToolsWindowTesting { | 20 class DevToolsWindowTesting { |
22 public: | 21 public: |
23 virtual ~DevToolsWindowTesting(); | 22 virtual ~DevToolsWindowTesting(); |
24 | 23 |
25 // The following methods block until DevToolsWindow is completely loaded. | 24 // The following methods block until DevToolsWindow is completely loaded. |
26 static DevToolsWindow* OpenDevToolsWindowSync( | 25 static DevToolsWindow* OpenDevToolsWindowSync( |
27 content::RenderViewHost* inspected_rvh, bool is_docked); | 26 content::WebContents* inspected_web_contents, |
| 27 bool is_docked); |
28 static DevToolsWindow* OpenDevToolsWindowSync( | 28 static DevToolsWindow* OpenDevToolsWindowSync( |
29 Browser* browser, bool is_docked); | 29 Browser* browser, bool is_docked); |
30 static DevToolsWindow* OpenDevToolsWindowForWorkerSync( | 30 static DevToolsWindow* OpenDevToolsWindowForWorkerSync( |
31 Profile* profile, content::DevToolsAgentHost* worker_agent); | 31 Profile* profile, content::DevToolsAgentHost* worker_agent); |
32 | 32 |
33 // Closes the window like it was user-initiated. | 33 // Closes the window like it was user-initiated. |
34 static void CloseDevToolsWindow(DevToolsWindow* window); | 34 static void CloseDevToolsWindow(DevToolsWindow* window); |
35 // Blocks until window is closed. | 35 // Blocks until window is closed. |
36 static void CloseDevToolsWindowSync(DevToolsWindow* window); | 36 static void CloseDevToolsWindowSync(DevToolsWindow* window); |
37 | 37 |
(...skipping 13 matching lines...) Expand all Loading... |
51 static void WindowClosed(DevToolsWindow* window); | 51 static void WindowClosed(DevToolsWindow* window); |
52 static DevToolsWindowTesting* Find(DevToolsWindow* window); | 52 static DevToolsWindowTesting* Find(DevToolsWindow* window); |
53 | 53 |
54 DevToolsWindow* devtools_window_; | 54 DevToolsWindow* devtools_window_; |
55 base::Closure close_callback_; | 55 base::Closure close_callback_; |
56 | 56 |
57 DISALLOW_COPY_AND_ASSIGN(DevToolsWindowTesting); | 57 DISALLOW_COPY_AND_ASSIGN(DevToolsWindowTesting); |
58 }; | 58 }; |
59 | 59 |
60 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_TESTING_H_ | 60 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_WINDOW_TESTING_H_ |
OLD | NEW |