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

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

Issue 865253002: Delete temporary application file as soon as the application is launched. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: clang format Created 5 years, 11 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
« no previous file with comments | « no previous file | shell/app_child_process.cc » ('j') | shell/dynamic_application_loader.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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
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
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
OLDNEW
« no previous file with comments | « no previous file | shell/app_child_process.cc » ('j') | shell/dynamic_application_loader.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698