| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/public/app/content_main_runner.h" | 5 #include "content/public/app/content_main_runner.h" |
| 6 | 6 |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 | 8 |
| 9 #include "base/allocator/allocator_extension.h" | 9 #include "base/allocator/allocator_extension.h" |
| 10 #include "base/at_exit.h" | 10 #include "base/at_exit.h" |
| (...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 (delegate_ && | 659 (delegate_ && |
| 660 delegate_->ProcessRegistersWithSystemProcess(process_type))) { | 660 delegate_->ProcessRegistersWithSystemProcess(process_type))) { |
| 661 base::PowerMonitorDeviceSource::AllocateSystemIOPorts(); | 661 base::PowerMonitorDeviceSource::AllocateSystemIOPorts(); |
| 662 } | 662 } |
| 663 | 663 |
| 664 if (!process_type.empty() && | 664 if (!process_type.empty() && |
| 665 (!delegate_ || delegate_->ShouldSendMachPort(process_type))) { | 665 (!delegate_ || delegate_->ShouldSendMachPort(process_type))) { |
| 666 MachBroker::ChildSendTaskPortToParent(); | 666 MachBroker::ChildSendTaskPortToParent(); |
| 667 } | 667 } |
| 668 #elif defined(OS_WIN) | 668 #elif defined(OS_WIN) |
| 669 base::TimeTicks::SetNowIsHighResNowIfSupported(); | |
| 670 | |
| 671 bool init_device_scale_factor = true; | 669 bool init_device_scale_factor = true; |
| 672 if (command_line.HasSwitch(switches::kDeviceScaleFactor)) { | 670 if (command_line.HasSwitch(switches::kDeviceScaleFactor)) { |
| 673 std::string scale_factor_string = command_line.GetSwitchValueASCII( | 671 std::string scale_factor_string = command_line.GetSwitchValueASCII( |
| 674 switches::kDeviceScaleFactor); | 672 switches::kDeviceScaleFactor); |
| 675 double scale_factor = 0; | 673 double scale_factor = 0; |
| 676 if (base::StringToDouble(scale_factor_string, &scale_factor)) { | 674 if (base::StringToDouble(scale_factor_string, &scale_factor)) { |
| 677 init_device_scale_factor = false; | 675 init_device_scale_factor = false; |
| 678 gfx::InitDeviceScaleFactor(scale_factor); | 676 gfx::InitDeviceScaleFactor(scale_factor); |
| 679 } | 677 } |
| 680 } | 678 } |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 828 | 826 |
| 829 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); | 827 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); |
| 830 }; | 828 }; |
| 831 | 829 |
| 832 // static | 830 // static |
| 833 ContentMainRunner* ContentMainRunner::Create() { | 831 ContentMainRunner* ContentMainRunner::Create() { |
| 834 return new ContentMainRunnerImpl(); | 832 return new ContentMainRunnerImpl(); |
| 835 } | 833 } |
| 836 | 834 |
| 837 } // namespace content | 835 } // namespace content |
| OLD | NEW |