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

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

Issue 1376703002: Presentation API: reject screen availability observing on Android low ram devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments and compile fix Created 5 years, 2 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/media_sinks_observer.h" 5 #include "chrome/browser/media/router/media_sinks_observer.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/media/router/media_router.h" 8 #include "chrome/browser/media/router/media_router.h"
9 9
10 namespace media_router { 10 namespace media_router {
11 11
12 MediaSinksObserver::MediaSinksObserver(MediaRouter* router, 12 MediaSinksObserver::MediaSinksObserver(MediaRouter* router,
13 const MediaSource& source) 13 const MediaSource& source)
14 : source_(source), router_(router) { 14 : source_(source), router_(router) {
15 DCHECK(router_); 15 DCHECK(router_);
16 router_->RegisterMediaSinksObserver(this); 16 is_active_ = router_->RegisterMediaSinksObserver(this);
whywhat 2015/09/29 12:29:22 Maybe we shouldn't actually do this work in the ct
mlamouri (slow - plz ping) 2015/09/29 14:44:52 As discussed, we could have a ::Create() static me
17 } 17 }
18 18
19 MediaSinksObserver::~MediaSinksObserver() { 19 MediaSinksObserver::~MediaSinksObserver() {
20 router_->UnregisterMediaSinksObserver(this); 20 router_->UnregisterMediaSinksObserver(this);
21 } 21 }
22 22
23 } // namespace media_router 23 } // namespace media_router
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698