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

Side by Side Diff: services/android/java_handler.cc

Issue 943053003: Simple multi-url support for mojo apps (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: hate Created 5 years, 9 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 unified diff | Download patch
OLDNEW
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 #include "services/android/java_handler.h" 5 #include "services/android/java_handler.h"
6 6
7 #include "base/android/base_jni_onload.h" 7 #include "base/android/base_jni_onload.h"
8 #include "base/android/jni_android.h" 8 #include "base/android/jni_android.h"
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/android/library_loader/library_loader_hooks.h" 10 #include "base/android/library_loader/library_loader_hooks.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 jobject context = base::android::GetApplicationContext(); 49 jobject context = base::android::GetApplicationContext();
50 Java_JavaHandler_bootstrap( 50 Java_JavaHandler_bootstrap(
51 env, context, j_archive_path.obj(), 51 env, context, j_archive_path.obj(),
52 application_request.PassMessagePipe().release().value()); 52 application_request.PassMessagePipe().release().value());
53 } 53 }
54 54
55 void JavaHandler::Initialize(mojo::ApplicationImpl* app) { 55 void JavaHandler::Initialize(mojo::ApplicationImpl* app) {
56 } 56 }
57 57
58 bool JavaHandler::ConfigureIncomingConnection( 58 bool JavaHandler::ConfigureIncomingConnection(
59 mojo::ApplicationConnection* connection) { 59 mojo::ApplicationConnection* connection,
60 const std::string& url) {
60 connection->AddService(&content_handler_factory_); 61 connection->AddService(&content_handler_factory_);
61 return true; 62 return true;
62 } 63 }
63 64
64 } // namespace android 65 } // namespace android
65 } // namespace services 66 } // namespace services
66 67
67 namespace { 68 namespace {
68 69
69 bool RegisterJNI(JNIEnv* env) { 70 bool RegisterJNI(JNIEnv* env) {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 return JNI_VERSION_1_4; 103 return JNI_VERSION_1_4;
103 } 104 }
104 105
105 // This is needed because the application needs to access the application 106 // This is needed because the application needs to access the application
106 // context. 107 // context.
107 extern "C" JNI_EXPORT void InitApplicationContext( 108 extern "C" JNI_EXPORT void InitApplicationContext(
108 const base::android::JavaRef<jobject>& context) { 109 const base::android::JavaRef<jobject>& context) {
109 JNIEnv* env = base::android::AttachCurrentThread(); 110 JNIEnv* env = base::android::AttachCurrentThread();
110 base::android::InitApplicationContext(env, context); 111 base::android::InitApplicationContext(env, context);
111 } 112 }
112
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698