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

Side by Side Diff: components/nacl/loader/nacl_main.cc

Issue 2067233002: Revert of Use Mojo pipes to signal sync IPC events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « components/nacl/loader/nacl_helper_linux.cc ('k') | components/nacl_nonsfi.gyp » ('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 <utility> 5 #include <utility>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/power_monitor/power_monitor.h" 9 #include "base/power_monitor/power_monitor.h"
10 #include "base/power_monitor/power_monitor_device_source.h" 10 #include "base/power_monitor/power_monitor_device_source.h"
11 #include "base/timer/hi_res_timer_manager.h" 11 #include "base/timer/hi_res_timer_manager.h"
12 #include "build/build_config.h" 12 #include "build/build_config.h"
13 #include "components/nacl/loader/nacl_listener.h" 13 #include "components/nacl/loader/nacl_listener.h"
14 #include "components/nacl/loader/nacl_main_platform_delegate.h" 14 #include "components/nacl/loader/nacl_main_platform_delegate.h"
15 #include "content/public/common/content_switches.h" 15 #include "content/public/common/content_switches.h"
16 #include "content/public/common/main_function_params.h" 16 #include "content/public/common/main_function_params.h"
17 #include "mojo/edk/embedder/embedder.h"
18 17
19 // main() routine for the NaCl loader process. 18 // main() routine for the NaCl loader process.
20 int NaClMain(const content::MainFunctionParams& parameters) { 19 int NaClMain(const content::MainFunctionParams& parameters) {
21 const base::CommandLine& parsed_command_line = parameters.command_line; 20 const base::CommandLine& parsed_command_line = parameters.command_line;
22 21
23 // The Mojo EDK must be initialized before using IPC.
24 mojo::edk::Init();
25
26 // The main thread of the plugin services IO. 22 // The main thread of the plugin services IO.
27 base::MessageLoopForIO main_message_loop; 23 base::MessageLoopForIO main_message_loop;
28 base::PlatformThread::SetName("CrNaClMain"); 24 base::PlatformThread::SetName("CrNaClMain");
29 25
30 std::unique_ptr<base::PowerMonitorSource> power_monitor_source( 26 std::unique_ptr<base::PowerMonitorSource> power_monitor_source(
31 new base::PowerMonitorDeviceSource()); 27 new base::PowerMonitorDeviceSource());
32 base::PowerMonitor power_monitor(std::move(power_monitor_source)); 28 base::PowerMonitor power_monitor(std::move(power_monitor_source));
33 base::HighResolutionTimerManager hi_res_timer_manager; 29 base::HighResolutionTimerManager hi_res_timer_manager;
34 30
35 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \ 31 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \
(...skipping 14 matching lines...) Expand all
50 #if defined(OS_POSIX) 46 #if defined(OS_POSIX)
51 listener.set_number_of_cores(number_of_cores); 47 listener.set_number_of_cores(number_of_cores);
52 #endif 48 #endif
53 49
54 listener.Listen(); 50 listener.Listen();
55 #else 51 #else
56 NOTIMPLEMENTED() << " not implemented startup, plugin startup dialog etc."; 52 NOTIMPLEMENTED() << " not implemented startup, plugin startup dialog etc.";
57 #endif 53 #endif
58 return 0; 54 return 0;
59 } 55 }
OLDNEW
« no previous file with comments | « components/nacl/loader/nacl_helper_linux.cc ('k') | components/nacl_nonsfi.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698