| 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/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/debug/dump_without_crashing.h" | 10 #include "base/debug/dump_without_crashing.h" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 | 105 |
| 106 BrowserChildProcessHostImpl::BrowserChildProcessHostImpl( | 106 BrowserChildProcessHostImpl::BrowserChildProcessHostImpl( |
| 107 content::ProcessType process_type, | 107 content::ProcessType process_type, |
| 108 BrowserChildProcessHostDelegate* delegate) | 108 BrowserChildProcessHostDelegate* delegate) |
| 109 : data_(process_type), | 109 : data_(process_type), |
| 110 delegate_(delegate), | 110 delegate_(delegate), |
| 111 power_monitor_message_broadcaster_(this) { | 111 power_monitor_message_broadcaster_(this) { |
| 112 data_.id = ChildProcessHostImpl::GenerateChildProcessUniqueId(); | 112 data_.id = ChildProcessHostImpl::GenerateChildProcessUniqueId(); |
| 113 | 113 |
| 114 child_process_host_.reset(ChildProcessHost::Create(this)); | 114 child_process_host_.reset(ChildProcessHost::Create(this)); |
| 115 AddFilter(new TraceMessageFilter); | 115 AddFilter(new TraceMessageFilter(data_.id)); |
| 116 AddFilter(new ProfilerMessageFilter(process_type)); | 116 AddFilter(new ProfilerMessageFilter(process_type)); |
| 117 AddFilter(new HistogramMessageFilter); | 117 AddFilter(new HistogramMessageFilter); |
| 118 | 118 |
| 119 g_child_process_list.Get().push_back(this); | 119 g_child_process_list.Get().push_back(this); |
| 120 GetContentClient()->browser()->BrowserChildProcessHostCreated(this); | 120 GetContentClient()->browser()->BrowserChildProcessHostCreated(this); |
| 121 | 121 |
| 122 power_monitor_message_broadcaster_.Init(); | 122 power_monitor_message_broadcaster_.Init(); |
| 123 } | 123 } |
| 124 | 124 |
| 125 BrowserChildProcessHostImpl::~BrowserChildProcessHostImpl() { | 125 BrowserChildProcessHostImpl::~BrowserChildProcessHostImpl() { |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 | 375 |
| 376 #if defined(OS_WIN) | 376 #if defined(OS_WIN) |
| 377 | 377 |
| 378 void BrowserChildProcessHostImpl::OnObjectSignaled(HANDLE object) { | 378 void BrowserChildProcessHostImpl::OnObjectSignaled(HANDLE object) { |
| 379 OnChildDisconnected(); | 379 OnChildDisconnected(); |
| 380 } | 380 } |
| 381 | 381 |
| 382 #endif | 382 #endif |
| 383 | 383 |
| 384 } // namespace content | 384 } // namespace content |
| OLD | NEW |