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

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

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: fix and add tests 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 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINKS_OBSERVER_H_ 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINKS_OBSERVER_H_
6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINKS_OBSERVER_H_ 6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINKS_OBSERVER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 17 matching lines...) Expand all
28 28
29 // This function is invoked when the list of sinks compatible 29 // This function is invoked when the list of sinks compatible
30 // with |source_| has been updated. 30 // with |source_| has been updated.
31 // Implementations may not perform operations that modify the Media Router's 31 // Implementations may not perform operations that modify the Media Router's
32 // observer list. In particular, invoking this observer's destructor within 32 // observer list. In particular, invoking this observer's destructor within
33 // OnSinksReceived will result in undefined behavior. 33 // OnSinksReceived will result in undefined behavior.
34 virtual void OnSinksReceived(const std::vector<MediaSink>& sinks) {} 34 virtual void OnSinksReceived(const std::vector<MediaSink>& sinks) {}
35 35
36 const MediaSource& source() const { return source_; } 36 const MediaSource& source() const { return source_; }
37 37
38 bool is_active() const { return is_active_; }
39
38 private: 40 private:
39 const MediaSource source_; 41 const MediaSource source_;
40 MediaRouter* router_; 42 MediaRouter* router_;
43 bool is_active_;
41 44
42 DISALLOW_COPY_AND_ASSIGN(MediaSinksObserver); 45 DISALLOW_COPY_AND_ASSIGN(MediaSinksObserver);
43 }; 46 };
44 47
45 } // namespace media_router 48 } // namespace media_router
46 49
47 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINKS_OBSERVER_H_ 50 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_SINKS_OBSERVER_H_
OLDNEW
« no previous file with comments | « chrome/browser/media/router/media_router_mojo_impl_unittest.cc ('k') | chrome/browser/media/router/media_sinks_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698