Index: mandoline/ui/test_runner/test_runner_application_delegate.h |
diff --git a/mandoline/ui/test_runner/test_runner_application_delegate.h b/mandoline/ui/test_runner/test_runner_application_delegate.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f263dc616d585c364bb2c1b317d285b382b89575 |
--- /dev/null |
+++ b/mandoline/ui/test_runner/test_runner_application_delegate.h |
@@ -0,0 +1,60 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef MANDOLINE_UI_TEST_RUNNER_TEST_RUNNER_APPLICATION_DELEGATE_H_ |
+#define MANDOLINE_UI_TEST_RUNNER_TEST_RUNNER_APPLICATION_DELEGATE_H_ |
+ |
+#include "base/command_line.h" |
+#include "components/html_viewer/public/interfaces/layout_test_runner.mojom.h" |
+#include "mandoline/ui/phone_ui/phone_browser_application_delegate.h" |
+ |
+namespace mojo { |
+class View; |
+} |
+ |
+namespace mandoline { |
+ |
+class TestRunnerApplicationDelegate |
+ : public PhoneBrowserApplicationDelegate, |
+ public html_viewer::LayoutTestRunner, |
+ public mojo::InterfaceFactory<html_viewer::LayoutTestRunner> { |
+ public: |
+ TestRunnerApplicationDelegate(); |
+ ~TestRunnerApplicationDelegate() override; |
+ |
+ private: |
+ void Terminate(); |
+ |
+ // PhoneBrowserApplicationDelegate: |
+ bool ShouldLaunchURLOnInitialize() const override; |
+ gfx::Size GetViewportSize() const override; |
+ |
+ // mojo::ViewTreeDelegate: |
+ void OnEmbed(mojo::View* root) override; |
+ |
+ // mojo::ApplicationDelegate: |
+ bool ConfigureIncomingConnection( |
+ mojo::ApplicationConnection* connection) override; |
+ |
+ // html_viewer::LayoutTestRunner: |
+ void TestFinished() override; |
+ |
+ using PhoneBrowserApplicationDelegate::Create; |
+ |
+ // mojo::InterfaceFactory<html_viewer::LayoutTestRunner>: |
+ void Create( |
+ mojo::ApplicationConnection* connection, |
+ mojo::InterfaceRequest<html_viewer::LayoutTestRunner> request) override; |
+ |
+ base::CommandLine::StringVector cmdline_args_; |
+ size_t cmdline_position_ = 0; |
+ |
+ mojo::WeakBindingSet<html_viewer::LayoutTestRunner> layout_test_runner_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(TestRunnerApplicationDelegate); |
+}; |
+ |
+} // namespace mandoline |
+ |
+#endif // MANDOLINE_UI_TEST_RUNNER_TEST_RUNNER_APPLICATION_DELEGATE_H_ |