OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef MANDOLINE_UI_TEST_RUNNER_TEST_RUNNER_APPLICATION_DELEGATE_H_ |
| 6 #define MANDOLINE_UI_TEST_RUNNER_TEST_RUNNER_APPLICATION_DELEGATE_H_ |
| 7 |
| 8 #include "base/command_line.h" |
| 9 #include "components/html_viewer/public/interfaces/layout_test_runner.mojom.h" |
| 10 #include "mandoline/ui/phone_ui/phone_browser_application_delegate.h" |
| 11 |
| 12 namespace mojo { |
| 13 class View; |
| 14 } |
| 15 |
| 16 namespace mandoline { |
| 17 |
| 18 class TestRunnerApplicationDelegate |
| 19 : public PhoneBrowserApplicationDelegate, |
| 20 public html_viewer::LayoutTestRunner, |
| 21 public mojo::InterfaceFactory<html_viewer::LayoutTestRunner> { |
| 22 public: |
| 23 TestRunnerApplicationDelegate(); |
| 24 ~TestRunnerApplicationDelegate() override; |
| 25 |
| 26 private: |
| 27 void Terminate(); |
| 28 |
| 29 // PhoneBrowserApplicationDelegate: |
| 30 bool ShouldLaunchURLOnInitialize() const override; |
| 31 gfx::Size GetViewportSize() const override; |
| 32 |
| 33 // mojo::ViewTreeDelegate: |
| 34 void OnEmbed(mojo::View* root) override; |
| 35 |
| 36 // mojo::ApplicationDelegate: |
| 37 bool ConfigureIncomingConnection( |
| 38 mojo::ApplicationConnection* connection) override; |
| 39 |
| 40 // html_viewer::LayoutTestRunner: |
| 41 void TestFinished() override; |
| 42 |
| 43 using PhoneBrowserApplicationDelegate::Create; |
| 44 |
| 45 // mojo::InterfaceFactory<html_viewer::LayoutTestRunner>: |
| 46 void Create( |
| 47 mojo::ApplicationConnection* connection, |
| 48 mojo::InterfaceRequest<html_viewer::LayoutTestRunner> request) override; |
| 49 |
| 50 base::CommandLine::StringVector cmdline_args_; |
| 51 size_t cmdline_position_ = 0; |
| 52 |
| 53 mojo::WeakBindingSet<html_viewer::LayoutTestRunner> layout_test_runner_; |
| 54 |
| 55 DISALLOW_COPY_AND_ASSIGN(TestRunnerApplicationDelegate); |
| 56 }; |
| 57 |
| 58 } // namespace mandoline |
| 59 |
| 60 #endif // MANDOLINE_UI_TEST_RUNNER_TEST_RUNNER_APPLICATION_DELEGATE_H_ |
OLD | NEW |