| OLD | NEW |
| 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/logging.h" | 6 #include "base/logging.h" |
| 7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "base/power_monitor/power_monitor.h" | 8 #include "base/power_monitor/power_monitor.h" |
| 9 #include "base/power_monitor/power_monitor_device_source.h" | 9 #include "base/power_monitor/power_monitor_device_source.h" |
| 10 #include "base/process/launch.h" | 10 #include "base/process/launch.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 namespace { | 26 namespace { |
| 27 // main() routine for the NaCl broker process. | 27 // main() routine for the NaCl broker process. |
| 28 // This is necessary for supporting NaCl in Chrome on Win64. | 28 // This is necessary for supporting NaCl in Chrome on Win64. |
| 29 int NaClBrokerMain(const content::MainFunctionParams& parameters) { | 29 int NaClBrokerMain(const content::MainFunctionParams& parameters) { |
| 30 base::MessageLoopForIO main_message_loop; | 30 base::MessageLoopForIO main_message_loop; |
| 31 base::PlatformThread::SetName("CrNaClBrokerMain"); | 31 base::PlatformThread::SetName("CrNaClBrokerMain"); |
| 32 | 32 |
| 33 scoped_ptr<base::PowerMonitorSource> power_monitor_source( | 33 scoped_ptr<base::PowerMonitorSource> power_monitor_source( |
| 34 new base::PowerMonitorDeviceSource()); | 34 new base::PowerMonitorDeviceSource()); |
| 35 base::PowerMonitor power_monitor(power_monitor_source.Pass()); | 35 base::PowerMonitor::Initialize(power_monitor_source.Pass()); |
| 36 base::HighResolutionTimerManager hi_res_timer_manager; | 36 base::HighResolutionTimerManager hi_res_timer_manager; |
| 37 | 37 |
| 38 NaClBrokerListener listener; | 38 NaClBrokerListener listener; |
| 39 listener.Listen(); | 39 listener.Listen(); |
| 40 | 40 |
| 41 return 0; | 41 return 0; |
| 42 } | 42 } |
| 43 | 43 |
| 44 } // namespace | 44 } // namespace |
| 45 | 45 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 74 return NaClMain(main_params); | 74 return NaClMain(main_params); |
| 75 | 75 |
| 76 if (process_type == switches::kNaClBrokerProcess) | 76 if (process_type == switches::kNaClBrokerProcess) |
| 77 return NaClBrokerMain(main_params); | 77 return NaClBrokerMain(main_params); |
| 78 | 78 |
| 79 CHECK(false) << "Unknown NaCl 64 process."; | 79 CHECK(false) << "Unknown NaCl 64 process."; |
| 80 return -1; | 80 return -1; |
| 81 } | 81 } |
| 82 | 82 |
| 83 } // namespace nacl | 83 } // namespace nacl |
| OLD | NEW |