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

Side by Side Diff: shell/android/android_handler.cc

Issue 1916233002: Mark ApplicationImpl::ConnectTo{Application,Service}() as deprecated. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 8 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 "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
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
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
OLDNEW
« no previous file with comments | « services/url_response_disk_cache/url_response_disk_cache_apptest.cc ('k') | shell/android/nfc_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698