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 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
650 (delegate_ && | 650 (delegate_ && |
651 delegate_->ProcessRegistersWithSystemProcess(process_type))) { | 651 delegate_->ProcessRegistersWithSystemProcess(process_type))) { |
652 base::PowerMonitorDeviceSource::AllocateSystemIOPorts(); | 652 base::PowerMonitorDeviceSource::AllocateSystemIOPorts(); |
653 } | 653 } |
654 | 654 |
655 if (!process_type.empty() && | 655 if (!process_type.empty() && |
656 (!delegate_ || delegate_->ShouldSendMachPort(process_type))) { | 656 (!delegate_ || delegate_->ShouldSendMachPort(process_type))) { |
657 MachBroker::ChildSendTaskPortToParent(); | 657 MachBroker::ChildSendTaskPortToParent(); |
658 } | 658 } |
659 #elif defined(OS_WIN) | 659 #elif defined(OS_WIN) |
660 if (command_line.HasSwitch(switches::kEnableHighResolutionTime)) | 660 base::TimeTicks::SetNowIsHighResNowIfSupported(); |
661 base::TimeTicks::SetNowIsHighResNowIfSupported(); | |
662 | 661 |
663 bool init_device_scale_factor = true; | 662 bool init_device_scale_factor = true; |
664 if (command_line.HasSwitch(switches::kDeviceScaleFactor)) { | 663 if (command_line.HasSwitch(switches::kDeviceScaleFactor)) { |
665 std::string scale_factor_string = command_line.GetSwitchValueASCII( | 664 std::string scale_factor_string = command_line.GetSwitchValueASCII( |
666 switches::kDeviceScaleFactor); | 665 switches::kDeviceScaleFactor); |
667 double scale_factor = 0; | 666 double scale_factor = 0; |
668 if (base::StringToDouble(scale_factor_string, &scale_factor)) { | 667 if (base::StringToDouble(scale_factor_string, &scale_factor)) { |
669 init_device_scale_factor = false; | 668 init_device_scale_factor = false; |
670 gfx::InitDeviceScaleFactor(scale_factor); | 669 gfx::InitDeviceScaleFactor(scale_factor); |
671 } | 670 } |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
818 | 817 |
819 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); | 818 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); |
820 }; | 819 }; |
821 | 820 |
822 // static | 821 // static |
823 ContentMainRunner* ContentMainRunner::Create() { | 822 ContentMainRunner* ContentMainRunner::Create() { |
824 return new ContentMainRunnerImpl(); | 823 return new ContentMainRunnerImpl(); |
825 } | 824 } |
826 | 825 |
827 } // namespace content | 826 } // namespace content |
OLD | NEW |