| 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 #include "components/web_view/test_runner/test_runner_application_delegate.h" | 5 #include "components/web_view/test_runner/test_runner_application_delegate.h" |
| 6 | 6 |
| 7 #include <iostream> | 7 #include <iostream> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 mus::CreateSingleWindowTreeHost(app_, this, &host_); | 69 mus::CreateSingleWindowTreeHost(app_, this, &host_); |
| 70 } | 70 } |
| 71 | 71 |
| 72 bool TestRunnerApplicationDelegate::ConfigureIncomingConnection( | 72 bool TestRunnerApplicationDelegate::ConfigureIncomingConnection( |
| 73 mojo::ApplicationConnection* connection) { | 73 mojo::ApplicationConnection* connection) { |
| 74 connection->AddService<web_view::LayoutTestRunner>(this); | 74 connection->AddService<web_view::LayoutTestRunner>(this); |
| 75 return true; | 75 return true; |
| 76 } | 76 } |
| 77 | 77 |
| 78 //////////////////////////////////////////////////////////////////////////////// | 78 //////////////////////////////////////////////////////////////////////////////// |
| 79 // mus::ViewTreeDelegate implementation: | 79 // mus::WindowTreeDelegate implementation: |
| 80 | 80 |
| 81 void TestRunnerApplicationDelegate::OnEmbed(mus::Window* root) { | 81 void TestRunnerApplicationDelegate::OnEmbed(mus::Window* root) { |
| 82 root_ = root; | 82 root_ = root; |
| 83 | 83 |
| 84 // If this is a sys-check, then terminate in the next cycle. | 84 // If this is a sys-check, then terminate in the next cycle. |
| 85 const char kCheckLayoutTestSysDeps[] = "check-layout-test-sys-deps"; | 85 const char kCheckLayoutTestSysDeps[] = "check-layout-test-sys-deps"; |
| 86 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 86 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 87 kCheckLayoutTestSysDeps)) { | 87 kCheckLayoutTestSysDeps)) { |
| 88 base::ThreadTaskRunnerHandle::Get()->PostTask( | 88 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 89 FROM_HERE, base::Bind(&TestRunnerApplicationDelegate::Terminate, | 89 FROM_HERE, base::Bind(&TestRunnerApplicationDelegate::Terminate, |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 //////////////////////////////////////////////////////////////////////////////// | 153 //////////////////////////////////////////////////////////////////////////////// |
| 154 // mojo::InterfaceFactory<LayoutTestRunner> implementation: | 154 // mojo::InterfaceFactory<LayoutTestRunner> implementation: |
| 155 | 155 |
| 156 void TestRunnerApplicationDelegate::Create( | 156 void TestRunnerApplicationDelegate::Create( |
| 157 mojo::ApplicationConnection* connection, | 157 mojo::ApplicationConnection* connection, |
| 158 mojo::InterfaceRequest<web_view::LayoutTestRunner> request) { | 158 mojo::InterfaceRequest<web_view::LayoutTestRunner> request) { |
| 159 layout_test_runner_.AddBinding(this, request.Pass()); | 159 layout_test_runner_.AddBinding(this, request.Pass()); |
| 160 } | 160 } |
| 161 | 161 |
| 162 } // namespace web_view | 162 } // namespace web_view |
| OLD | NEW |