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