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 #include "shell/android/android_handler.h" | 5 #include "shell/android/android_handler.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/android/jni_string.h" | 8 #include "base/android/jni_string.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 InitApplicationContextFn init_application_context = | 56 InitApplicationContextFn init_application_context = |
57 reinterpret_cast<InitApplicationContextFn>( | 57 reinterpret_cast<InitApplicationContextFn>( |
58 app_library.GetFunctionPointer(init_application_context_name)); | 58 app_library.GetFunctionPointer(init_application_context_name)); |
59 if (init_application_context) { | 59 if (init_application_context) { |
60 base::android::ScopedJavaLocalRef<jobject> scoped_context(env, j_context); | 60 base::android::ScopedJavaLocalRef<jobject> scoped_context(env, j_context); |
61 init_application_context(scoped_context); | 61 init_application_context(scoped_context); |
62 } | 62 } |
63 | 63 |
64 // Run the application. | 64 // Run the application. |
65 base::ScopedNativeLibrary app_library_from_runner( | 65 base::ScopedNativeLibrary app_library_from_runner( |
66 shell::DynamicServiceRunner::LoadAndRunService(app_path, handle.Pass())); | 66 shell::DynamicServiceRunner::LoadAndRunService(app_path, true, |
| 67 handle.Pass())); |
67 } | 68 } |
68 } // namespace | 69 } // namespace |
69 | 70 |
70 AndroidHandler::AndroidHandler() : content_handler_factory_(this) { | 71 AndroidHandler::AndroidHandler() : content_handler_factory_(this) { |
71 } | 72 } |
72 | 73 |
73 AndroidHandler::~AndroidHandler() { | 74 AndroidHandler::~AndroidHandler() { |
74 } | 75 } |
75 | 76 |
76 void AndroidHandler::RunApplication(ShellPtr shell, URLResponsePtr response) { | 77 void AndroidHandler::RunApplication(ShellPtr shell, URLResponsePtr response) { |
(...skipping 18 matching lines...) Expand all Loading... |
95 ApplicationConnection* connection) { | 96 ApplicationConnection* connection) { |
96 connection->AddService(&content_handler_factory_); | 97 connection->AddService(&content_handler_factory_); |
97 return true; | 98 return true; |
98 } | 99 } |
99 | 100 |
100 bool RegisterAndroidHandlerJni(JNIEnv* env) { | 101 bool RegisterAndroidHandlerJni(JNIEnv* env) { |
101 return RegisterNativesImpl(env); | 102 return RegisterNativesImpl(env); |
102 } | 103 } |
103 | 104 |
104 } // namespace mojo | 105 } // namespace mojo |
OLD | NEW |