| 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 27 matching lines...) Expand all Loading... |
| 38 #include "content/public/browser/browser_thread.h" | 38 #include "content/public/browser/browser_thread.h" |
| 39 #include "content/public/browser/child_process_data.h" | 39 #include "content/public/browser/child_process_data.h" |
| 40 #include "content/public/browser/content_browser_client.h" | 40 #include "content/public/browser/content_browser_client.h" |
| 41 #include "content/public/common/connection_filter.h" | 41 #include "content/public/common/connection_filter.h" |
| 42 #include "content/public/common/content_features.h" | 42 #include "content/public/common/content_features.h" |
| 43 #include "content/public/common/content_switches.h" | 43 #include "content/public/common/content_switches.h" |
| 44 #include "content/public/common/mojo_channel_switches.h" | 44 #include "content/public/common/mojo_channel_switches.h" |
| 45 #include "content/public/common/process_type.h" | 45 #include "content/public/common/process_type.h" |
| 46 #include "content/public/common/result_codes.h" | 46 #include "content/public/common/result_codes.h" |
| 47 #include "content/public/common/service_manager_connection.h" | 47 #include "content/public/common/service_manager_connection.h" |
| 48 #include "device/power_monitor/power_monitor_message_broadcaster.h" | |
| 49 #include "mojo/edk/embedder/embedder.h" | 48 #include "mojo/edk/embedder/embedder.h" |
| 50 #include "services/service_manager/public/cpp/interface_registry.h" | 49 #include "services/service_manager/public/cpp/interface_registry.h" |
| 51 | 50 |
| 52 #if defined(OS_MACOSX) | 51 #if defined(OS_MACOSX) |
| 53 #include "content/browser/mach_broker_mac.h" | 52 #include "content/browser/mach_broker_mac.h" |
| 54 #endif | 53 #endif |
| 55 | 54 |
| 56 namespace content { | 55 namespace content { |
| 57 namespace { | 56 namespace { |
| 58 | 57 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 89 | 88 |
| 90 class ConnectionFilterImpl : public ConnectionFilter { | 89 class ConnectionFilterImpl : public ConnectionFilter { |
| 91 public: | 90 public: |
| 92 ConnectionFilterImpl() {} | 91 ConnectionFilterImpl() {} |
| 93 | 92 |
| 94 private: | 93 private: |
| 95 // ConnectionFilter: | 94 // ConnectionFilter: |
| 96 bool OnConnect(const service_manager::Identity& remote_identity, | 95 bool OnConnect(const service_manager::Identity& remote_identity, |
| 97 service_manager::InterfaceRegistry* registry, | 96 service_manager::InterfaceRegistry* registry, |
| 98 service_manager::Connector* connector) override { | 97 service_manager::Connector* connector) override { |
| 99 registry->AddInterface( | |
| 100 base::Bind(&device::PowerMonitorMessageBroadcaster::Create)); | |
| 101 return true; | 98 return true; |
| 102 } | 99 } |
| 103 | 100 |
| 104 DISALLOW_COPY_AND_ASSIGN(ConnectionFilterImpl); | 101 DISALLOW_COPY_AND_ASSIGN(ConnectionFilterImpl); |
| 105 }; | 102 }; |
| 106 | 103 |
| 107 } // namespace | 104 } // namespace |
| 108 | 105 |
| 109 BrowserChildProcessHost* BrowserChildProcessHost::Create( | 106 BrowserChildProcessHost* BrowserChildProcessHost::Create( |
| 110 content::ProcessType process_type, | 107 content::ProcessType process_type, |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 | 602 |
| 606 #if defined(OS_WIN) | 603 #if defined(OS_WIN) |
| 607 | 604 |
| 608 void BrowserChildProcessHostImpl::OnObjectSignaled(HANDLE object) { | 605 void BrowserChildProcessHostImpl::OnObjectSignaled(HANDLE object) { |
| 609 OnChildDisconnected(); | 606 OnChildDisconnected(); |
| 610 } | 607 } |
| 611 | 608 |
| 612 #endif | 609 #endif |
| 613 | 610 |
| 614 } // namespace content | 611 } // namespace content |
| OLD | NEW |