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

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

Issue 817653003: Update from https://crrev.com/309717 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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 | « sandbox/linux/syscall_broker/broker_host.cc ('k') | skia/config/SkUserConfig.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/mojo_main.h" 5 #include "shell/android/mojo_main.h"
6 6
7 #include "base/android/java_handler_thread.h" 7 #include "base/android/java_handler_thread.h"
8 #include "base/android/jni_android.h" 8 #include "base/android/jni_android.h"
9 #include "base/android/jni_array.h" 9 #include "base/android/jni_array.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 jobjectArray jparameters, 75 jobjectArray jparameters,
76 jstring j_local_apps_directory) { 76 jstring j_local_apps_directory) {
77 base::android::ScopedJavaLocalRef<jobject> scoped_context(env, context); 77 base::android::ScopedJavaLocalRef<jobject> scoped_context(env, context);
78 base::android::InitApplicationContext(env, scoped_context); 78 base::android::InitApplicationContext(env, scoped_context);
79 79
80 std::vector<std::string> parameters; 80 std::vector<std::string> parameters;
81 parameters.push_back( 81 parameters.push_back(
82 base::android::ConvertJavaStringToUTF8(env, mojo_shell_path)); 82 base::android::ConvertJavaStringToUTF8(env, mojo_shell_path));
83 base::android::AppendJavaStringArrayToStringVector(env, jparameters, 83 base::android::AppendJavaStringArrayToStringVector(env, jparameters,
84 &parameters); 84 &parameters);
85 CommandLine::Init(0, nullptr); 85 base::CommandLine::Init(0, nullptr);
86 base::CommandLine::ForCurrentProcess()->InitFromArgv(parameters); 86 base::CommandLine::ForCurrentProcess()->InitFromArgv(parameters);
87 87
88 InitializeLogging(); 88 InitializeLogging();
89 89
90 // We want ~MessageLoop to happen prior to ~Context. Initializing 90 // We want ~MessageLoop to happen prior to ~Context. Initializing
91 // LazyInstances is akin to stack-allocating objects; their destructors 91 // LazyInstances is akin to stack-allocating objects; their destructors
92 // will be invoked first-in-last-out. 92 // will be invoked first-in-last-out.
93 Context* shell_context = new Context(); 93 Context* shell_context = new Context();
94 shell_context->mojo_url_resolver()->SetLocalAppsPath(base::FilePath( 94 shell_context->mojo_url_resolver()->SetLocalAppsPath(base::FilePath(
95 base::android::ConvertJavaStringToUTF8(env, j_local_apps_directory))); 95 base::android::ConvertJavaStringToUTF8(env, j_local_apps_directory)));
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 base::CommandLine::ForCurrentProcess()->AppendArg( 129 base::CommandLine::ForCurrentProcess()->AppendArg(
130 base::android::ConvertJavaStringToUTF8(env, jurl)); 130 base::android::ConvertJavaStringToUTF8(env, jurl));
131 } 131 }
132 132
133 bool RegisterMojoMain(JNIEnv* env) { 133 bool RegisterMojoMain(JNIEnv* env) {
134 return RegisterNativesImpl(env); 134 return RegisterNativesImpl(env);
135 } 135 }
136 136
137 } // namespace shell 137 } // namespace shell
138 } // namespace mojo 138 } // namespace mojo
OLDNEW
« no previous file with comments | « sandbox/linux/syscall_broker/broker_host.cc ('k') | skia/config/SkUserConfig.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698