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

Side by Side Diff: chrome/browser/ui/ash/cast_config_delegate_media_router.cc

Issue 1693963003: Pass origin to StartObservingMediaSinks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Marks Review Fixes with URL changes Created 4 years, 9 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/ui/ash/cast_config_delegate_media_router.h" 5 #include "chrome/browser/ui/ash/cast_config_delegate_media_router.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 // Not owned. 77 // Not owned.
78 ash::CastConfigDelegate* cast_config_delegate_; 78 ash::CastConfigDelegate* cast_config_delegate_;
79 79
80 DISALLOW_COPY_AND_ASSIGN(CastDeviceCache); 80 DISALLOW_COPY_AND_ASSIGN(CastDeviceCache);
81 }; 81 };
82 82
83 CastDeviceCache::CastDeviceCache(ash::CastConfigDelegate* cast_config_delegate) 83 CastDeviceCache::CastDeviceCache(ash::CastConfigDelegate* cast_config_delegate)
84 : MediaRoutesObserver(GetMediaRouter()), 84 : MediaRoutesObserver(GetMediaRouter()),
85 MediaSinksObserver(GetMediaRouter(), 85 MediaSinksObserver(GetMediaRouter(),
86 media_router::MediaSourceForDesktop()), 86 media_router::MediaSourceForDesktop(),
87 cast_config_delegate_(cast_config_delegate) { 87 media_router::OriginForDesktop()),
88 } 88 cast_config_delegate_(cast_config_delegate) {}
89 89
90 CastDeviceCache::~CastDeviceCache() {} 90 CastDeviceCache::~CastDeviceCache() {}
91 91
92 void CastDeviceCache::Init() { 92 void CastDeviceCache::Init() {
93 CHECK(MediaSinksObserver::Init()); 93 CHECK(MediaSinksObserver::Init());
94 } 94 }
95 95
96 void CastDeviceCache::OnSinksReceived(const MediaSinks& sinks) { 96 void CastDeviceCache::OnSinksReceived(const MediaSinks& sinks) {
97 sinks_ = sinks; 97 sinks_ = sinks;
98 cast_config_delegate_->RequestDeviceRefresh(); 98 cast_config_delegate_->RequestDeviceRefresh();
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 216
217 void CastConfigDelegateMediaRouter::AddObserver( 217 void CastConfigDelegateMediaRouter::AddObserver(
218 ash::CastConfigDelegate::Observer* observer) { 218 ash::CastConfigDelegate::Observer* observer) {
219 observer_list_.AddObserver(observer); 219 observer_list_.AddObserver(observer);
220 } 220 }
221 221
222 void CastConfigDelegateMediaRouter::RemoveObserver( 222 void CastConfigDelegateMediaRouter::RemoveObserver(
223 ash::CastConfigDelegate::Observer* observer) { 223 ash::CastConfigDelegate::Observer* observer) {
224 observer_list_.RemoveObserver(observer); 224 observer_list_.RemoveObserver(observer);
225 } 225 }
OLDNEW
« no previous file with comments | « chrome/browser/media/router/test_helper.h ('k') | chrome/browser/ui/webui/media_router/media_router_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698