OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_WEB_VIEW__TEST_RUNNER_TEST_RUNNER_APPLICATION_DELEGATE_H_ | 5 #ifndef COMPONENTS_WEB_VIEW__TEST_RUNNER_TEST_RUNNER_APPLICATION_DELEGATE_H_ |
6 #define COMPONENTS_WEB_VIEW__TEST_RUNNER_TEST_RUNNER_APPLICATION_DELEGATE_H_ | 6 #define COMPONENTS_WEB_VIEW__TEST_RUNNER_TEST_RUNNER_APPLICATION_DELEGATE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 public mojo::InterfaceFactory<LayoutTestRunner> { | 32 public mojo::InterfaceFactory<LayoutTestRunner> { |
33 public: | 33 public: |
34 TestRunnerApplicationDelegate(); | 34 TestRunnerApplicationDelegate(); |
35 ~TestRunnerApplicationDelegate() override; | 35 ~TestRunnerApplicationDelegate() override; |
36 | 36 |
37 private: | 37 private: |
38 void LaunchURL(const GURL& test_url); | 38 void LaunchURL(const GURL& test_url); |
39 void Terminate(); | 39 void Terminate(); |
40 | 40 |
41 // mojo::ApplicationDelegate: | 41 // mojo::ApplicationDelegate: |
42 void Initialize(mojo::ApplicationImpl* app) override; | 42 void Initialize(mojo::Shell* shell, const std::string& url, |
| 43 uint32_t id) override; |
43 bool AcceptConnection( | 44 bool AcceptConnection( |
44 mojo::ApplicationConnection* connection) override; | 45 mojo::ApplicationConnection* connection) override; |
45 | 46 |
46 // mus::WindowTreeDelegate: | 47 // mus::WindowTreeDelegate: |
47 void OnEmbed(mus::Window* root) override; | 48 void OnEmbed(mus::Window* root) override; |
48 void OnConnectionLost(mus::WindowTreeConnection* connection) override; | 49 void OnConnectionLost(mus::WindowTreeConnection* connection) override; |
49 | 50 |
50 // mojom::WebViewClient: | 51 // mojom::WebViewClient: |
51 void TopLevelNavigateRequest(mojo::URLRequestPtr request) override; | 52 void TopLevelNavigateRequest(mojo::URLRequestPtr request) override; |
52 void TopLevelNavigationStarted(const mojo::String& url) override; | 53 void TopLevelNavigationStarted(const mojo::String& url) override; |
53 void LoadingStateChanged(bool is_loading, double progress) override; | 54 void LoadingStateChanged(bool is_loading, double progress) override; |
54 void BackForwardChanged(mojom::ButtonState back_button, | 55 void BackForwardChanged(mojom::ButtonState back_button, |
55 mojom::ButtonState forward_button) override; | 56 mojom::ButtonState forward_button) override; |
56 void TitleChanged(const mojo::String& title) override; | 57 void TitleChanged(const mojo::String& title) override; |
57 void FindInPageMatchCountUpdated(int32_t request_id, | 58 void FindInPageMatchCountUpdated(int32_t request_id, |
58 int32_t count, | 59 int32_t count, |
59 bool final_update) override {} | 60 bool final_update) override {} |
60 void FindInPageSelectionUpdated(int32_t request_id, | 61 void FindInPageSelectionUpdated(int32_t request_id, |
61 int32_t active_match_ordinal) override {} | 62 int32_t active_match_ordinal) override {} |
62 | 63 |
63 // LayoutTestRunner: | 64 // LayoutTestRunner: |
64 void TestFinished() override; | 65 void TestFinished() override; |
65 | 66 |
66 // mojo::InterfaceFactory<LayoutTestRunner>: | 67 // mojo::InterfaceFactory<LayoutTestRunner>: |
67 void Create(mojo::ApplicationConnection* connection, | 68 void Create(mojo::ApplicationConnection* connection, |
68 mojo::InterfaceRequest<LayoutTestRunner> request) override; | 69 mojo::InterfaceRequest<LayoutTestRunner> request) override; |
69 | 70 |
70 mojo::ApplicationImpl* app_; | 71 mojo::Shell* shell_; |
71 mus::mojom::WindowTreeHostPtr host_; | 72 mus::mojom::WindowTreeHostPtr host_; |
72 | 73 |
73 mus::Window* root_; | 74 mus::Window* root_; |
74 mus::Window* content_; | 75 mus::Window* content_; |
75 scoped_ptr<WebView> web_view_; | 76 scoped_ptr<WebView> web_view_; |
76 | 77 |
77 scoped_ptr<test_runner::TestInfoExtractor> test_extractor_; | 78 scoped_ptr<test_runner::TestInfoExtractor> test_extractor_; |
78 | 79 |
79 mojo::WeakBindingSet<LayoutTestRunner> layout_test_runner_; | 80 mojo::WeakBindingSet<LayoutTestRunner> layout_test_runner_; |
80 | 81 |
81 DISALLOW_COPY_AND_ASSIGN(TestRunnerApplicationDelegate); | 82 DISALLOW_COPY_AND_ASSIGN(TestRunnerApplicationDelegate); |
82 }; | 83 }; |
83 | 84 |
84 } // namespace web_view | 85 } // namespace web_view |
85 | 86 |
86 #endif // COMPONENTS_WEB_VIEW__TEST_RUNNER_TEST_RUNNER_APPLICATION_DELEGATE_H_ | 87 #endif // COMPONENTS_WEB_VIEW__TEST_RUNNER_TEST_RUNNER_APPLICATION_DELEGATE_H_ |
OLD | NEW |