OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 SERVICES_DART_CONTENT_HANDLER_APP_H_ | 5 #ifndef SERVICES_DART_CONTENT_HANDLER_APP_H_ |
6 #define SERVICES_DART_CONTENT_HANDLER_APP_H_ | 6 #define SERVICES_DART_CONTENT_HANDLER_APP_H_ |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "mojo/application/content_handler_factory.h" | 9 #include "mojo/application/content_handler_factory.h" |
10 #include "mojo/common/tracing_impl.h" | 10 #include "mojo/common/tracing_impl.h" |
11 #include "mojo/public/cpp/application/application_impl_base.h" | 11 #include "mojo/public/cpp/application/application_impl_base.h" |
12 #include "mojo/services/url_response_disk_cache/interfaces/url_response_disk_cac
he.mojom.h" | 12 #include "mojo/services/url_response_disk_cache/interfaces/url_response_disk_cac
he.mojom.h" |
13 #include "services/dart/content_handler_app_service_connector.h" | 13 #include "services/dart/content_handler_app_service_connector.h" |
14 #include "services/dart/dart_tracing.h" | 14 #include "services/dart/dart_tracing.h" |
15 | 15 |
16 namespace dart { | 16 namespace dart { |
17 | 17 |
18 class DartContentHandlerApp; | 18 class DartContentHandlerApp; |
19 | 19 |
20 class DartContentHandler : public mojo::ContentHandlerFactory::ManagedDelegate { | 20 class DartContentHandler : public mojo::ContentHandlerFactory::ManagedDelegate { |
21 public: | 21 public: |
22 DartContentHandler(DartContentHandlerApp* app, bool strict); | 22 DartContentHandler(DartContentHandlerApp* app, bool strict); |
23 | 23 |
24 void set_handler_task_runner( | 24 void set_handler_task_runner( |
25 scoped_refptr<base::SingleThreadTaskRunner> handler_task_runner); | 25 scoped_refptr<base::SingleThreadTaskRunner> handler_task_runner); |
26 | 26 |
27 private: | 27 private: |
28 // Overridden from ContentHandlerFactory::ManagedDelegate: | 28 // Overridden from ContentHandlerFactory::ManagedDelegate: |
29 scoped_ptr<mojo::ContentHandlerFactory::HandledApplicationHolder> | 29 std::unique_ptr<mojo::ContentHandlerFactory::HandledApplicationHolder> |
30 CreateApplication( | 30 CreateApplication( |
31 mojo::InterfaceRequest<mojo::Application> application_request, | 31 mojo::InterfaceRequest<mojo::Application> application_request, |
32 mojo::URLResponsePtr response) override; | 32 mojo::URLResponsePtr response) override; |
33 | 33 |
34 DartContentHandlerApp* app_; | 34 DartContentHandlerApp* app_; |
35 bool strict_; | 35 bool strict_; |
36 scoped_refptr<base::SingleThreadTaskRunner> handler_task_runner_; | 36 scoped_refptr<base::SingleThreadTaskRunner> handler_task_runner_; |
37 | 37 |
38 DISALLOW_COPY_AND_ASSIGN(DartContentHandler); | 38 DISALLOW_COPY_AND_ASSIGN(DartContentHandler); |
39 }; | 39 }; |
(...skipping 24 matching lines...) Expand all Loading... |
64 DartTracingImpl dart_tracing_; | 64 DartTracingImpl dart_tracing_; |
65 bool default_strict_; | 65 bool default_strict_; |
66 bool run_on_message_loop_; | 66 bool run_on_message_loop_; |
67 | 67 |
68 DISALLOW_COPY_AND_ASSIGN(DartContentHandlerApp); | 68 DISALLOW_COPY_AND_ASSIGN(DartContentHandlerApp); |
69 }; | 69 }; |
70 | 70 |
71 } // namespace dart | 71 } // namespace dart |
72 | 72 |
73 #endif // SERVICES_DART_CONTENT_HANDLER_APP_H_ | 73 #endif // SERVICES_DART_CONTENT_HANDLER_APP_H_ |
OLD | NEW |