Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: chrome/browser/media/router/presentation_service_delegate_impl.cc

Issue 2962623002: [Media Router] Clean up OffscreenPresentationManager params. (Closed)
Patch Set: Addressed Bin's comments Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698