| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "extensions/browser/mojo/service_registration.h" | 5 #include "extensions/browser/mojo/service_registration.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 .is_available(); | 41 .is_available(); |
| 42 } | 42 } |
| 43 #endif | 43 #endif |
| 44 | 44 |
| 45 } // namespace | 45 } // namespace |
| 46 | 46 |
| 47 void RegisterServicesForFrame(content::RenderFrameHost* render_frame_host, | 47 void RegisterServicesForFrame(content::RenderFrameHost* render_frame_host, |
| 48 const Extension* extension) { | 48 const Extension* extension) { |
| 49 DCHECK(extension); | 49 DCHECK(extension); |
| 50 | 50 |
| 51 shell::InterfaceRegistry* registry = | 51 service_manager::InterfaceRegistry* registry = |
| 52 render_frame_host->GetInterfaceRegistry(); | 52 render_frame_host->GetInterfaceRegistry(); |
| 53 registry->AddInterface(base::Bind( | 53 registry->AddInterface(base::Bind( |
| 54 KeepAliveImpl::Create, | 54 KeepAliveImpl::Create, |
| 55 render_frame_host->GetProcess()->GetBrowserContext(), extension)); | 55 render_frame_host->GetProcess()->GetBrowserContext(), extension)); |
| 56 | 56 |
| 57 #if defined(ENABLE_WIFI_DISPLAY) | 57 #if defined(ENABLE_WIFI_DISPLAY) |
| 58 if (ExtensionHasPermission(extension, render_frame_host->GetProcess(), | 58 if (ExtensionHasPermission(extension, render_frame_host->GetProcess(), |
| 59 "displaySource")) { | 59 "displaySource")) { |
| 60 registry->AddInterface( | 60 registry->AddInterface( |
| 61 base::Bind(WiFiDisplaySessionServiceImpl::BindToRequest, | 61 base::Bind(WiFiDisplaySessionServiceImpl::BindToRequest, |
| 62 render_frame_host->GetProcess()->GetBrowserContext())); | 62 render_frame_host->GetProcess()->GetBrowserContext())); |
| 63 registry->AddInterface( | 63 registry->AddInterface( |
| 64 base::Bind(WiFiDisplayMediaServiceImpl::BindToRequest)); | 64 base::Bind(WiFiDisplayMediaServiceImpl::BindToRequest)); |
| 65 } | 65 } |
| 66 #endif | 66 #endif |
| 67 } | 67 } |
| 68 | 68 |
| 69 } // namespace extensions | 69 } // namespace extensions |
| OLD | NEW |