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 RenderViewHost; | 14 class RenderViewHost; |
15 class Shell; | 15 class Shell; |
16 class WebContents; | 16 class WebContents; |
17 | 17 |
18 class LayoutTestDevToolsFrontend : public ShellDevToolsFrontend { | 18 class LayoutTestDevToolsFrontend : public ShellDevToolsFrontend { |
19 public: | 19 public: |
20 static LayoutTestDevToolsFrontend* Show(WebContents* inspected_contents, | 20 static LayoutTestDevToolsFrontend* Show(WebContents* inspected_contents, |
21 const std::string& settings, | 21 const std::string& settings, |
22 const std::string& frontend_url); | 22 const std::string& frontend_url); |
23 | 23 |
24 static GURL GetDevToolsPathAsURL(const std::string& settings, | 24 static GURL GetDevToolsPathAsURL(const std::string& settings, |
25 const std::string& frontend_url); | 25 const std::string& frontend_url); |
26 | 26 |
27 void ReuseFrontend(const std::string& settings, | 27 void ReuseFrontend(const std::string& settings, |
28 const std::string frontend_url); | 28 const std::string frontend_url); |
| 29 void EvaluateInFrontend(int call_id, const std::string& expression); |
29 | 30 |
30 private: | 31 private: |
31 LayoutTestDevToolsFrontend(Shell* frontend_shell, | 32 LayoutTestDevToolsFrontend(Shell* frontend_shell, |
32 WebContents* inspected_contents); | 33 WebContents* inspected_contents); |
33 ~LayoutTestDevToolsFrontend() override; | 34 ~LayoutTestDevToolsFrontend() override; |
34 | 35 |
35 // content::DevToolsAgentHostClient implementation. | 36 // content::DevToolsAgentHostClient implementation. |
36 void AgentHostClosed(DevToolsAgentHost* agent_host, bool replaced) override; | 37 void AgentHostClosed(DevToolsAgentHost* agent_host, bool replaced) override; |
37 | 38 |
| 39 // ShellDevToolsFrontend overrides. |
| 40 void HandleMessageFromDevToolsFrontend(const std::string& message) override; |
| 41 |
38 // WebContentsObserver implementation. | 42 // WebContentsObserver implementation. |
39 void RenderProcessGone(base::TerminationStatus status) override; | 43 void RenderProcessGone(base::TerminationStatus status) override; |
40 | 44 |
| 45 bool ready_for_test_; |
| 46 std::vector<std::pair<int, std::string>> pending_evaluations_; |
| 47 |
41 DISALLOW_COPY_AND_ASSIGN(LayoutTestDevToolsFrontend); | 48 DISALLOW_COPY_AND_ASSIGN(LayoutTestDevToolsFrontend); |
42 }; | 49 }; |
43 | 50 |
44 } // namespace content | 51 } // namespace content |
45 | 52 |
46 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_DEVTOOLS_FRONTEND_H_ | 53 #endif // CONTENT_SHELL_BROWSER_LAYOUT_TEST_LAYOUT_TEST_DEVTOOLS_FRONTEND_H_ |
OLD | NEW |