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