| 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 "chrome/browser/media/router/mojo/media_router_mojo_impl.h" | 5 #include "chrome/browser/media/router/mojo/media_router_mojo_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 } | 74 } |
| 75 | 75 |
| 76 MediaRouterMojoImpl::~MediaRouterMojoImpl() { | 76 MediaRouterMojoImpl::~MediaRouterMojoImpl() { |
| 77 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 77 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 78 } | 78 } |
| 79 | 79 |
| 80 // static | 80 // static |
| 81 void MediaRouterMojoImpl::BindToRequest( | 81 void MediaRouterMojoImpl::BindToRequest( |
| 82 const extensions::Extension* extension, | 82 const extensions::Extension* extension, |
| 83 content::BrowserContext* context, | 83 content::BrowserContext* context, |
| 84 mojo::InterfaceRequest<mojom::MediaRouter> request) { | 84 const service_manager::BindSourceInfo& source_info, |
| 85 mojom::MediaRouterRequest request) { |
| 85 MediaRouterMojoImpl* impl = static_cast<MediaRouterMojoImpl*>( | 86 MediaRouterMojoImpl* impl = static_cast<MediaRouterMojoImpl*>( |
| 86 MediaRouterFactory::GetApiForBrowserContext(context)); | 87 MediaRouterFactory::GetApiForBrowserContext(context)); |
| 87 DCHECK(impl); | 88 DCHECK(impl); |
| 88 | 89 |
| 89 impl->BindToMojoRequest(std::move(request), *extension); | 90 impl->BindToMojoRequest(std::move(request), *extension); |
| 90 } | 91 } |
| 91 | 92 |
| 92 void MediaRouterMojoImpl::BindToMojoRequest( | 93 void MediaRouterMojoImpl::BindToMojoRequest( |
| 93 mojo::InterfaceRequest<mojom::MediaRouter> request, | 94 mojo::InterfaceRequest<mojom::MediaRouter> request, |
| 94 const extensions::Extension& extension) { | 95 const extensions::Extension& extension) { |
| (...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1089 | 1090 |
| 1090 void MediaRouterMojoImpl::OnMediaControllerCreated( | 1091 void MediaRouterMojoImpl::OnMediaControllerCreated( |
| 1091 const MediaRoute::Id& route_id, | 1092 const MediaRoute::Id& route_id, |
| 1092 bool success) { | 1093 bool success) { |
| 1093 // TODO(takumif): Record success/failure with UMA. | 1094 // TODO(takumif): Record success/failure with UMA. |
| 1094 DVLOG_WITH_INSTANCE(1) << "OnMediaControllerCreated: " << route_id | 1095 DVLOG_WITH_INSTANCE(1) << "OnMediaControllerCreated: " << route_id |
| 1095 << (success ? " was successful." : " failed."); | 1096 << (success ? " was successful." : " failed."); |
| 1096 } | 1097 } |
| 1097 | 1098 |
| 1098 } // namespace media_router | 1099 } // namespace media_router |
| OLD | NEW |