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/presentation_service_delegate_impl.h" | 5 #include "chrome/browser/media/router/presentation_service_delegate_impl.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <unordered_map> | 8 #include <unordered_map> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 DLOG(WARNING) << "No route for [presentation_id]: " | 282 DLOG(WARNING) << "No route for [presentation_id]: " |
283 << presentation_info.presentation_id; | 283 << presentation_info.presentation_id; |
284 return; | 284 return; |
285 } | 285 } |
286 | 286 |
287 if (pid_route_it->second.is_offscreen_presentation()) { | 287 if (pid_route_it->second.is_offscreen_presentation()) { |
288 auto* offscreen_presentation_manager = | 288 auto* offscreen_presentation_manager = |
289 OffscreenPresentationManagerFactory::GetOrCreateForWebContents( | 289 OffscreenPresentationManagerFactory::GetOrCreateForWebContents( |
290 web_contents_); | 290 web_contents_); |
291 offscreen_presentation_manager->RegisterOffscreenPresentationController( | 291 offscreen_presentation_manager->RegisterOffscreenPresentationController( |
292 presentation_info.presentation_id, presentation_info.presentation_url, | 292 presentation_info, render_frame_host_id_, |
293 render_frame_host_id_, std::move(controller_connection_ptr), | 293 std::move(controller_connection_ptr), |
294 std::move(receiver_connection_request), pid_route_it->second); | 294 std::move(receiver_connection_request), pid_route_it->second); |
295 } else { | 295 } else { |
296 DVLOG(2) | 296 DVLOG(2) |
297 << "Creating BrowserPresentationConnectionProxy for [presentation_id]: " | 297 << "Creating BrowserPresentationConnectionProxy for [presentation_id]: " |
298 << presentation_info.presentation_id; | 298 << presentation_info.presentation_id; |
299 MediaRoute::Id route_id = pid_route_it->second.media_route_id(); | 299 MediaRoute::Id route_id = pid_route_it->second.media_route_id(); |
300 if (base::ContainsKey(browser_connection_proxies_, route_id)) { | 300 if (base::ContainsKey(browser_connection_proxies_, route_id)) { |
301 DLOG(ERROR) << __func__ | 301 DLOG(ERROR) << __func__ |
302 << "Already has a BrowserPresentationConnectionProxy for " | 302 << "Already has a BrowserPresentationConnectionProxy for " |
303 << "route: " << route_id; | 303 << "route: " << route_id; |
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
981 const base::ListValue* origins = | 981 const base::ListValue* origins = |
982 Profile::FromBrowserContext(web_contents_->GetBrowserContext()) | 982 Profile::FromBrowserContext(web_contents_->GetBrowserContext()) |
983 ->GetPrefs() | 983 ->GetPrefs() |
984 ->GetList(prefs::kMediaRouterTabMirroringSources); | 984 ->GetList(prefs::kMediaRouterTabMirroringSources); |
985 return origins && | 985 return origins && |
986 origins->Find(base::Value(origin.Serialize())) != origins->end(); | 986 origins->Find(base::Value(origin.Serialize())) != origins->end(); |
987 } | 987 } |
988 #endif // !defined(OS_ANDROID) | 988 #endif // !defined(OS_ANDROID) |
989 | 989 |
990 } // namespace media_router | 990 } // namespace media_router |
OLD | NEW |