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

Side by Side Diff: chrome/browser/media/router/mojo/media_router_mojo_impl.cc

Issue 1862913004: [Media Router] Wire through a new MRPM call to update media sinks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed indent, added wake reason. Created 4 years, 8 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/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 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 DCHECK(thread_checker_.CalledOnValidThread()); 420 DCHECK(thread_checker_.CalledOnValidThread());
421 issue_manager_.AddIssue(issue); 421 issue_manager_.AddIssue(issue);
422 } 422 }
423 423
424 void MediaRouterMojoImpl::ClearIssue(const Issue::Id& issue_id) { 424 void MediaRouterMojoImpl::ClearIssue(const Issue::Id& issue_id) {
425 DCHECK(thread_checker_.CalledOnValidThread()); 425 DCHECK(thread_checker_.CalledOnValidThread());
426 issue_manager_.ClearIssue(issue_id); 426 issue_manager_.ClearIssue(issue_id);
427 } 427 }
428 428
429 void MediaRouterMojoImpl::OnUserGesture() { 429 void MediaRouterMojoImpl::OnUserGesture() {
430 DoUserGestureDiscovery();
430 #if defined(OS_WIN) 431 #if defined(OS_WIN)
431 EnsureMdnsDiscoveryEnabled(); 432 EnsureMdnsDiscoveryEnabled();
432 #endif 433 #endif
433 } 434 }
434 435
435 bool MediaRouterMojoImpl::RegisterMediaSinksObserver( 436 bool MediaRouterMojoImpl::RegisterMediaSinksObserver(
436 MediaSinksObserver* observer) { 437 MediaSinksObserver* observer) {
437 DCHECK(thread_checker_.CalledOnValidThread()); 438 DCHECK(thread_checker_.CalledOnValidThread());
438 439
439 // Create an observer list for the media source and add |observer| 440 // Create an observer list for the media source and add |observer|
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 } 980 }
980 } 981 }
981 982
982 void MediaRouterMojoImpl::OnFirewallCheckComplete( 983 void MediaRouterMojoImpl::OnFirewallCheckComplete(
983 bool firewall_can_use_local_ports) { 984 bool firewall_can_use_local_ports) {
984 if (firewall_can_use_local_ports) 985 if (firewall_can_use_local_ports)
985 EnsureMdnsDiscoveryEnabled(); 986 EnsureMdnsDiscoveryEnabled();
986 } 987 }
987 #endif 988 #endif
988 989
990 void MediaRouterMojoImpl::DoUserGestureDiscovery() {
991 SetWakeReason(MediaRouteProviderWakeReason::USER_GESTURE_DISCOVERY);
mark a. foltz 2016/04/07 22:45:00 You need to check if the MRPM is awake and post a
mark a. foltz 2016/04/07 22:45:00 You need to check if the MRPM is awake and post a
amp 2016/04/09 00:02:12 Done.
992 media_route_provider_->StartDiscovery();
993 }
994
989 } // namespace media_router 995 } // namespace media_router
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698