| 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 <fcntl.h> | 7 #include <fcntl.h> |
| 8 | 8 |
| 9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
| 10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 RunAndroidApplicationFn run_android_application_fn = &RunAndroidApplication; | 118 RunAndroidApplicationFn run_android_application_fn = &RunAndroidApplication; |
| 119 Java_AndroidHandler_bootstrap( | 119 Java_AndroidHandler_bootstrap( |
| 120 env, GetApplicationContext(), tracing_id, j_extracted_dir.obj(), | 120 env, GetApplicationContext(), tracing_id, j_extracted_dir.obj(), |
| 121 j_cache_dir.obj(), | 121 j_cache_dir.obj(), |
| 122 application_request.PassMessagePipe().release().value(), | 122 application_request.PassMessagePipe().release().value(), |
| 123 reinterpret_cast<jlong>(run_android_application_fn)); | 123 reinterpret_cast<jlong>(run_android_application_fn)); |
| 124 } | 124 } |
| 125 | 125 |
| 126 void AndroidHandler::Initialize(mojo::ApplicationImpl* app) { | 126 void AndroidHandler::Initialize(mojo::ApplicationImpl* app) { |
| 127 handler_task_runner_ = base::MessageLoop::current()->task_runner(); | 127 handler_task_runner_ = base::MessageLoop::current()->task_runner(); |
| 128 app->ConnectToService("mojo:url_response_disk_cache", | 128 app->ConnectToServiceDeprecated("mojo:url_response_disk_cache", |
| 129 &url_response_disk_cache_); | 129 &url_response_disk_cache_); |
| 130 } | 130 } |
| 131 | 131 |
| 132 bool AndroidHandler::ConfigureIncomingConnection( | 132 bool AndroidHandler::ConfigureIncomingConnection( |
| 133 mojo::ApplicationConnection* connection) { | 133 mojo::ApplicationConnection* connection) { |
| 134 connection->AddService(&content_handler_factory_); | 134 connection->AddService(&content_handler_factory_); |
| 135 return true; | 135 return true; |
| 136 } | 136 } |
| 137 | 137 |
| 138 void AndroidHandler::ExtractApplication(base::FilePath* extracted_dir, | 138 void AndroidHandler::ExtractApplication(base::FilePath* extracted_dir, |
| 139 base::FilePath* cache_dir, | 139 base::FilePath* cache_dir, |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 return ConvertUTF8ToJavaString(env, temporary_file.value()).Release(); | 177 return ConvertUTF8ToJavaString(env, temporary_file.value()).Release(); |
| 178 } | 178 } |
| 179 } | 179 } |
| 180 } | 180 } |
| 181 | 181 |
| 182 bool RegisterAndroidHandlerJni(JNIEnv* env) { | 182 bool RegisterAndroidHandlerJni(JNIEnv* env) { |
| 183 return RegisterNativesImpl(env); | 183 return RegisterNativesImpl(env); |
| 184 } | 184 } |
| 185 | 185 |
| 186 } // namespace shell | 186 } // namespace shell |
| OLD | NEW |