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

Side by Side Diff: content/app/content_main_runner.cc

Issue 25954005: Mac: Do not ask to handle power events in processes with no PowerManager. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 2 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 // management setup to be completed. 665 // management setup to be completed.
666 TRACE_EVENT0("startup", "ContentMainRunnerImpl::Initialize"); 666 TRACE_EVENT0("startup", "ContentMainRunnerImpl::Initialize");
667 #endif // !OS_ANDROID 667 #endif // !OS_ANDROID
668 668
669 #if defined(OS_MACOSX) && !defined(OS_IOS) 669 #if defined(OS_MACOSX) && !defined(OS_IOS)
670 // We need to allocate the IO Ports before the Sandbox is initialized or 670 // We need to allocate the IO Ports before the Sandbox is initialized or
671 // the first instance of PowerMonitor is created. 671 // the first instance of PowerMonitor is created.
672 // It's important not to allocate the ports for processes which don't 672 // It's important not to allocate the ports for processes which don't
673 // register with the power monitor - see crbug.com/88867. 673 // register with the power monitor - see crbug.com/88867.
674 if (process_type.empty() || 674 if (process_type.empty() ||
675 process_type == switches::kPluginProcess ||
676 process_type == switches::kRendererProcess ||
677 process_type == switches::kUtilityProcess ||
678 process_type == switches::kWorkerProcess ||
679 (delegate && 675 (delegate &&
680 delegate->ProcessRegistersWithSystemProcess(process_type))) { 676 delegate->ProcessRegistersWithSystemProcess(process_type))) {
681 base::PowerMonitorDeviceSource::AllocateSystemIOPorts(); 677 base::PowerMonitorDeviceSource::AllocateSystemIOPorts();
682 } 678 }
683 679
684 if (!process_type.empty() && 680 if (!process_type.empty() &&
685 (!delegate || delegate->ShouldSendMachPort(process_type))) { 681 (!delegate || delegate->ShouldSendMachPort(process_type))) {
686 MachBroker::ChildSendTaskPortToParent(); 682 MachBroker::ChildSendTaskPortToParent();
687 } 683 }
688 #elif defined(OS_WIN) 684 #elif defined(OS_WIN)
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 835
840 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); 836 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl);
841 }; 837 };
842 838
843 // static 839 // static
844 ContentMainRunner* ContentMainRunner::Create() { 840 ContentMainRunner* ContentMainRunner::Create() {
845 return new ContentMainRunnerImpl(); 841 return new ContentMainRunnerImpl();
846 } 842 }
847 843
848 } // namespace content 844 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698