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

Side by Side Diff: mojo/runner/in_process_native_runner.cc

Issue 1429263005: Revert of mandoline: Fix ICU initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « mojo/runner/context.cc ('k') | mojo/runner/init.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 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 "mojo/runner/in_process_native_runner.h" 5 #include "mojo/runner/in_process_native_runner.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
11 #include "base/threading/platform_thread.h" 11 #include "base/threading/platform_thread.h"
12 #include "mojo/runner/init.h"
13 #include "mojo/runner/native_application_support.h" 12 #include "mojo/runner/native_application_support.h"
14 #include "mojo/runner/out_of_process_native_runner.h" 13 #include "mojo/runner/out_of_process_native_runner.h"
15 14
16 namespace mojo { 15 namespace mojo {
17 namespace runner { 16 namespace runner {
18 17
19 InProcessNativeRunner::InProcessNativeRunner(Context* context) 18 InProcessNativeRunner::InProcessNativeRunner(Context* context)
20 : app_library_(nullptr) {} 19 : app_library_(nullptr) {}
21 20
22 InProcessNativeRunner::~InProcessNativeRunner() { 21 InProcessNativeRunner::~InProcessNativeRunner() {
(...skipping 28 matching lines...) Expand all
51 } 50 }
52 51
53 void InProcessNativeRunner::Run() { 52 void InProcessNativeRunner::Run() {
54 DVLOG(2) << "Loading/running Mojo app in process from library: " 53 DVLOG(2) << "Loading/running Mojo app in process from library: "
55 << app_path_.value() 54 << app_path_.value()
56 << " thread id=" << base::PlatformThread::CurrentId(); 55 << " thread id=" << base::PlatformThread::CurrentId();
57 56
58 // TODO(vtl): ScopedNativeLibrary doesn't have a .get() method! 57 // TODO(vtl): ScopedNativeLibrary doesn't have a .get() method!
59 base::NativeLibrary app_library = LoadNativeApplication(app_path_); 58 base::NativeLibrary app_library = LoadNativeApplication(app_path_);
60 app_library_.Reset(app_library); 59 app_library_.Reset(app_library);
61 CallLibraryEarlyInitialization(app_library);
62 RunNativeApplication(app_library, application_request_.Pass()); 60 RunNativeApplication(app_library, application_request_.Pass());
63 app_completed_callback_runner_.Run(); 61 app_completed_callback_runner_.Run();
64 app_completed_callback_runner_.Reset(); 62 app_completed_callback_runner_.Reset();
65 } 63 }
66 64
67 scoped_ptr<shell::NativeRunner> InProcessNativeRunnerFactory::Create( 65 scoped_ptr<shell::NativeRunner> InProcessNativeRunnerFactory::Create(
68 const base::FilePath& app_path) { 66 const base::FilePath& app_path) {
69 // Non-Mojo apps are always run in a new process. 67 // Non-Mojo apps are always run in a new process.
70 if (!app_path.MatchesExtension(FILE_PATH_LITERAL(".mojo"))) 68 if (!app_path.MatchesExtension(FILE_PATH_LITERAL(".mojo")))
71 return make_scoped_ptr(new OutOfProcessNativeRunner(context_)); 69 return make_scoped_ptr(new OutOfProcessNativeRunner(context_));
72 return make_scoped_ptr(new InProcessNativeRunner(context_)); 70 return make_scoped_ptr(new InProcessNativeRunner(context_));
73 } 71 }
74 72
75 } // namespace runner 73 } // namespace runner
76 } // namespace mojo 74 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/runner/context.cc ('k') | mojo/runner/init.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698