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

Side by Side Diff: content/browser/browser_child_process_host_impl.cc

Issue 17074009: Created multi-process-friendly PowerMonitor interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing windows unit test errors Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/browser_child_process_host_impl.h ('k') | content/browser/browser_main_loop.cc » ('j') | 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/browser/browser_child_process_host_impl.h" 5 #include "content/browser/browser_child_process_host_impl.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 void BrowserChildProcessHostImpl::RemoveObserver( 88 void BrowserChildProcessHostImpl::RemoveObserver(
89 BrowserChildProcessObserver* observer) { 89 BrowserChildProcessObserver* observer) {
90 // TODO(phajdan.jr): Check thread after fixing http://crbug.com/167126. 90 // TODO(phajdan.jr): Check thread after fixing http://crbug.com/167126.
91 g_observers.Get().RemoveObserver(observer); 91 g_observers.Get().RemoveObserver(observer);
92 } 92 }
93 93
94 BrowserChildProcessHostImpl::BrowserChildProcessHostImpl( 94 BrowserChildProcessHostImpl::BrowserChildProcessHostImpl(
95 int process_type, 95 int process_type,
96 BrowserChildProcessHostDelegate* delegate) 96 BrowserChildProcessHostDelegate* delegate)
97 : data_(process_type), 97 : data_(process_type),
98 delegate_(delegate) { 98 delegate_(delegate),
99 power_monitor_message_broadcaster_(this) {
99 data_.id = ChildProcessHostImpl::GenerateChildProcessUniqueId(); 100 data_.id = ChildProcessHostImpl::GenerateChildProcessUniqueId();
100 101
101 child_process_host_.reset(ChildProcessHost::Create(this)); 102 child_process_host_.reset(ChildProcessHost::Create(this));
102 child_process_host_->AddFilter(new TraceMessageFilter); 103 child_process_host_->AddFilter(new TraceMessageFilter);
103 child_process_host_->AddFilter(new ProfilerMessageFilter(process_type)); 104 child_process_host_->AddFilter(new ProfilerMessageFilter(process_type));
104 child_process_host_->AddFilter(new HistogramMessageFilter()); 105 child_process_host_->AddFilter(new HistogramMessageFilter());
105 106
106 g_child_process_list.Get().push_back(this); 107 g_child_process_list.Get().push_back(this);
107 GetContentClient()->browser()->BrowserChildProcessHostCreated(this); 108 GetContentClient()->browser()->BrowserChildProcessHostCreated(this);
108 } 109 }
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 344
344 void BrowserChildProcessHostImpl::OnProcessExitedEarly( 345 void BrowserChildProcessHostImpl::OnProcessExitedEarly(
345 base::WaitableEvent* event) { 346 base::WaitableEvent* event) {
346 DeleteProcessWaitableEvent(event); 347 DeleteProcessWaitableEvent(event);
347 OnChildDisconnected(); 348 OnChildDisconnected();
348 } 349 }
349 350
350 #endif 351 #endif
351 352
352 } // namespace content 353 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_child_process_host_impl.h ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698