OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 MOJO_SHELL_ANDROID_CONTENT_HANDLER_H_ | 5 #ifndef MOJO_SHELL_ANDROID_CONTENT_HANDLER_H_ |
6 #define MOJO_SHELL_ANDROID_CONTENT_HANDLER_H_ | 6 #define MOJO_SHELL_ANDROID_CONTENT_HANDLER_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include "mojo/application/content_handler_factory.h" | 10 #include "mojo/application/content_handler_factory.h" |
11 #include "mojo/public/cpp/application/application_delegate.h" | 11 #include "mojo/public/cpp/application/application_delegate.h" |
12 #include "mojo/public/cpp/application/interface_factory_impl.h" | 12 #include "mojo/public/cpp/application/interface_factory_impl.h" |
13 #include "mojo/services/content_handler/public/interfaces/content_handler.mojom.
h" | 13 #include "mojo/services/content_handler/public/interfaces/content_handler.mojom.
h" |
14 | 14 |
15 namespace base { | 15 namespace base { |
16 class FilePath; | 16 class FilePath; |
17 } | 17 } |
18 | 18 |
19 namespace mojo { | 19 namespace mojo { |
| 20 namespace shell { |
20 | 21 |
21 class AndroidHandler : public ApplicationDelegate, | 22 class AndroidHandler : public ApplicationDelegate, |
22 public ContentHandlerFactory::Delegate { | 23 public ContentHandlerFactory::Delegate { |
23 public: | 24 public: |
24 AndroidHandler(); | 25 AndroidHandler(); |
25 ~AndroidHandler(); | 26 ~AndroidHandler(); |
26 | 27 |
27 private: | 28 private: |
28 // ApplicationDelegate: | 29 // ApplicationDelegate: |
29 void Initialize(ApplicationImpl* app) override; | 30 void Initialize(ApplicationImpl* app) override; |
30 bool ConfigureIncomingConnection(ApplicationConnection* connection) override; | 31 bool ConfigureIncomingConnection(ApplicationConnection* connection) override; |
31 | 32 |
32 // ContentHandlerFactory::Delegate: | 33 // ContentHandlerFactory::Delegate: |
33 void RunApplication(InterfaceRequest<Application> application_request, | 34 void RunApplication(InterfaceRequest<Application> application_request, |
34 URLResponsePtr response) override; | 35 URLResponsePtr response) override; |
35 | 36 |
36 ContentHandlerFactory content_handler_factory_; | 37 ContentHandlerFactory content_handler_factory_; |
37 MOJO_DISALLOW_COPY_AND_ASSIGN(AndroidHandler); | 38 MOJO_DISALLOW_COPY_AND_ASSIGN(AndroidHandler); |
38 }; | 39 }; |
39 | 40 |
40 bool RegisterAndroidHandlerJni(JNIEnv* env); | 41 bool RegisterAndroidHandlerJni(JNIEnv* env); |
41 | 42 |
| 43 } // namespace shell |
42 } // namespace mojo | 44 } // namespace mojo |
43 | 45 |
44 #endif // MOJO_SHELL_ANDROID_CONTENT_HANDLER_H_ | 46 #endif // MOJO_SHELL_ANDROID_CONTENT_HANDLER_H_ |
OLD | NEW |