| 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 COMPONENTS_HTML_VIEWER_LAYOUT_TEST_CONTENT_HANDLER_IMPL_H_ | |
| 6 #define COMPONENTS_HTML_VIEWER_LAYOUT_TEST_CONTENT_HANDLER_IMPL_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "components/html_viewer/content_handler_impl.h" | |
| 10 #include "components/html_viewer/html_factory.h" | |
| 11 #include "components/test_runner/web_test_proxy.h" | |
| 12 | |
| 13 namespace blink { | |
| 14 class WebView; | |
| 15 } | |
| 16 | |
| 17 namespace test_runner { | |
| 18 class WebTestInterfaces; | |
| 19 } | |
| 20 | |
| 21 namespace html_viewer { | |
| 22 | |
| 23 class WebTestDelegateImpl; | |
| 24 | |
| 25 class LayoutTestContentHandlerImpl : public ContentHandlerImpl, | |
| 26 public HTMLFactory { | |
| 27 public: | |
| 28 LayoutTestContentHandlerImpl(GlobalState* global_state, | |
| 29 mojo::Shell* shell, | |
| 30 mojo::InterfaceRequest<ContentHandler> request, | |
| 31 test_runner::WebTestInterfaces* test_interfaces, | |
| 32 WebTestDelegateImpl* test_delegate); | |
| 33 ~LayoutTestContentHandlerImpl() override; | |
| 34 | |
| 35 private: | |
| 36 using WebWidgetProxy = | |
| 37 test_runner::WebTestProxy<HTMLWidgetRootLocal, | |
| 38 HTMLWidgetRootLocal::CreateParams*>; | |
| 39 | |
| 40 // ContentHandler: | |
| 41 void StartApplication( | |
| 42 mojo::ApplicationRequest request, | |
| 43 mojo::URLResponsePtr response, | |
| 44 const mojo::Callback<void()>& destruct_callback) override; | |
| 45 | |
| 46 // HTMLFactory | |
| 47 HTMLFrame* CreateHTMLFrame(HTMLFrame::CreateParams* params) override; | |
| 48 HTMLWidgetRootLocal* CreateHTMLWidgetRootLocal( | |
| 49 HTMLWidgetRootLocal::CreateParams* params) override; | |
| 50 | |
| 51 test_runner::WebTestInterfaces* test_interfaces_; | |
| 52 WebTestDelegateImpl* test_delegate_; | |
| 53 WebWidgetProxy* web_widget_proxy_; | |
| 54 scoped_ptr<mojo::AppRefCount> app_refcount_; | |
| 55 | |
| 56 DISALLOW_COPY_AND_ASSIGN(LayoutTestContentHandlerImpl); | |
| 57 }; | |
| 58 | |
| 59 } // namespace html_viewer | |
| 60 | |
| 61 #endif // COMPONENTS_HTML_VIEWER_LAYOUT_TEST_CONTENT_HANDLER_IMPL_H_ | |
| OLD | NEW |