Chromium Code Reviews| 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 #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 Loading... | |
| 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 Loading... | |
| 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 |
| OLD | NEW |