Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Unified Diff: services/android/java_handler.h

Issue 898853006: Java content handler for Android. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: services/android/java_handler.h
diff --git a/services/android/java_handler.h b/services/android/java_handler.h
new file mode 100644
index 0000000000000000000000000000000000000000..c73384149325db596ead3f3c2dbfb9545b10c194
--- /dev/null
+++ b/services/android/java_handler.h
@@ -0,0 +1,48 @@
+// Copyright 2014 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 SERVICES_ANDROID_JAVA_HANDLER_H_
+#define SERVICES_ANDROID_JAVA_HANDLER_H_
+
+#include <jni.h>
+
+#include "mojo/application/content_handler_factory.h"
+#include "mojo/public/cpp/application/application_delegate.h"
+#include "mojo/public/cpp/application/interface_factory_impl.h"
+#include "mojo/services/content_handler/public/interfaces/content_handler.mojom.h"
+
+namespace base {
+class FilePath;
+}
+
+namespace services {
+namespace android {
+
+class JavaHandler : public mojo::ApplicationDelegate,
+ public mojo::ContentHandlerFactory::Delegate {
+ public:
+ JavaHandler();
+ ~JavaHandler();
+
+ private:
+ // ApplicationDelegate:
+ void Initialize(mojo::ApplicationImpl* app) override;
+ bool ConfigureIncomingConnection(
+ mojo::ApplicationConnection* connection) override;
+
+ // ContentHandlerFactory::Delegate:
+ void RunApplication(
+ mojo::InterfaceRequest<mojo::Application> application_request,
+ mojo::URLResponsePtr response) override;
+
+ mojo::ContentHandlerFactory content_handler_factory_;
+ MOJO_DISALLOW_COPY_AND_ASSIGN(JavaHandler);
+};
+
+bool RegisterJavaHandlerJni(JNIEnv* env);
+
+} // namespace android
+} // namespace services
+
+#endif // SERVICES_ANDROID_JAVA_HANDLER_H_
« no previous file with comments | « services/android/java/src/org/chromium/services/android/JavaHandler.java ('k') | services/android/java_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698