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