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 CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_DEVTOOLS_FRONTEND_H_ | 5 #ifndef CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_DEVTOOLS_FRONTEND_H_ |
6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_DEVTOOLS_FRONTEND_H_ | 6 #define CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_DEVTOOLS_FRONTEND_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "content/shell/browser/shell_devtools_frontend.h" | 10 #include "content/shell/browser/shell_devtools_frontend.h" |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 | 13 |
14 class Shell; | 14 class Shell; |
15 class WebContents; | 15 class WebContents; |
16 | 16 |
17 class LayoutTestDevToolsFrontend : public ShellDevToolsFrontend { | 17 class LayoutTestDevToolsFrontend : public ShellDevToolsFrontend { |
18 public: | 18 public: |
| 19 static LayoutTestDevToolsFrontend* CreateDevToolsMainWindow( |
| 20 const Shell& inspected_window); |
19 static LayoutTestDevToolsFrontend* Show(WebContents* inspected_contents, | 21 static LayoutTestDevToolsFrontend* Show(WebContents* inspected_contents, |
20 const std::string& settings, | 22 const std::string& settings, |
21 const std::string& frontend_url); | 23 const std::string& frontend_url); |
22 | 24 |
23 static GURL GetDevToolsPathAsURL(const std::string& frontend_url); | 25 static GURL GetDevToolsPathAsURL(const std::string& frontend_url); |
24 | 26 |
25 static GURL MapJSTestURL(const GURL& test_url); | 27 static GURL MapIntegrationTestURL(const GURL& test_url); |
| 28 static GURL MapUnitTestURL(const GURL& test_url); |
26 | 29 |
27 void ReuseFrontend(const std::string& settings, | 30 void ReuseFrontend(const std::string& settings, |
28 const std::string frontend_url); | 31 const std::string frontend_url); |
29 void EvaluateInFrontend(int call_id, const std::string& expression); | 32 void EvaluateInFrontend(int call_id, const std::string& expression); |
30 | 33 |
31 private: | 34 private: |
32 LayoutTestDevToolsFrontend(Shell* frontend_shell, | 35 LayoutTestDevToolsFrontend(Shell* frontend_shell, |
33 WebContents* inspected_contents); | 36 WebContents* inspected_contents); |
34 ~LayoutTestDevToolsFrontend() override; | 37 ~LayoutTestDevToolsFrontend() override; |
35 | 38 |
36 // content::DevToolsAgentHostClient implementation. | 39 // content::DevToolsAgentHostClient implementation. |
37 void AgentHostClosed(DevToolsAgentHost* agent_host, bool replaced) override; | 40 void AgentHostClosed(DevToolsAgentHost* agent_host, bool replaced) override; |
38 | 41 |
39 // ShellDevToolsFrontend overrides. | 42 // ShellDevToolsFrontend overrides. |
40 void HandleMessageFromDevToolsFrontend(const std::string& message) override; | 43 void HandleMessageFromDevToolsFrontend(const std::string& message) override; |
41 | 44 |
42 // WebContentsObserver implementation. | 45 // WebContentsObserver implementation. |
43 void RenderProcessGone(base::TerminationStatus status) override; | 46 void RenderProcessGone(base::TerminationStatus status) override; |
44 void RenderFrameCreated(RenderFrameHost* render_frame_host) override; | 47 void RenderFrameCreated(RenderFrameHost* render_frame_host) override; |
45 | 48 |
46 bool ready_for_test_; | 49 bool ready_for_test_; |
47 std::vector<std::pair<int, std::string>> pending_evaluations_; | 50 std::vector<std::pair<int, std::string>> pending_evaluations_; |
48 | 51 |
49 DISALLOW_COPY_AND_ASSIGN(LayoutTestDevToolsFrontend); | 52 DISALLOW_COPY_AND_ASSIGN(LayoutTestDevToolsFrontend); |
50 }; | 53 }; |
51 | 54 |
52 } // namespace content | 55 } // namespace content |
53 | 56 |
54 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_DEVTOOLS_FRONTEND_H_ | 57 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_DEVTOOLS_FRONTEND_H_ |
OLD | NEW |