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 #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 Loading... |
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_ |
OLD | NEW |