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_ROUTES_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTES_OBSERVER_H_ |
6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTES_OBSERVER_H_ | 6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTES_OBSERVER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "chrome/browser/media/router/media_route.h" | 11 #include "chrome/browser/media/router/media_route.h" |
12 | 12 |
13 namespace media_router { | 13 namespace media_router { |
14 | 14 |
15 class MediaRouter; | 15 class MediaRouter; |
16 | 16 |
17 // Base class for observing when the set of MediaRoutes and their associated | 17 // Base class for observing when the set of MediaRoutes and their associated |
18 // MediaSinks have been updated. | 18 // MediaSinks have been updated. |
19 class MediaRoutesObserver { | 19 class MediaRoutesObserver { |
20 public: | 20 public: |
21 explicit MediaRoutesObserver(MediaRouter* router); | 21 explicit MediaRoutesObserver(MediaRouter* router); |
22 virtual ~MediaRoutesObserver(); | 22 virtual ~MediaRoutesObserver(); |
23 | 23 |
24 // This function is invoked when the list of routes and their associated | 24 // This function is invoked when the list of routes and their associated |
Wez
2015/05/26 23:41:30
nit: No need for "This function is"; can start wit
imcheng (use chromium acct)
2015/05/27 01:06:04
Done.
| |
25 // sinks have been updated. Routes included in the list are created either | 25 // sinks have been updated. Routes included in the list are created either |
26 // locally or remotely. | 26 // locally or remotely. |
Wez
2015/05/26 23:41:30
nit: "Routes included in the list..." - not clear
imcheng (use chromium acct)
2015/05/27 01:06:04
Done.
| |
27 // Implementations may not perform operations that modifies the Media Router's | |
Wez
2015/05/26 23:41:30
s/modifies/modify
imcheng (use chromium acct)
2015/05/27 01:06:04
Done.
| |
28 // observer list. In particular, invoking this instance's destructor within | |
Wez
2015/05/26 23:41:30
nit: s/instance/observer
imcheng (use chromium acct)
2015/05/27 01:06:04
Done.
| |
29 // this method will result in undefined behavior. | |
Wez
2015/05/26 23:41:30
nit: s/this method/OnRoutesUpdated
imcheng (use chromium acct)
2015/05/27 01:06:04
Done.
| |
27 virtual void OnRoutesUpdated(const std::vector<MediaRoute>& routes) {} | 30 virtual void OnRoutesUpdated(const std::vector<MediaRoute>& routes) {} |
28 | 31 |
29 private: | 32 private: |
30 MediaRouter* router_; | 33 MediaRouter* router_; |
31 | 34 |
32 DISALLOW_COPY_AND_ASSIGN(MediaRoutesObserver); | 35 DISALLOW_COPY_AND_ASSIGN(MediaRoutesObserver); |
33 }; | 36 }; |
34 | 37 |
35 } // namespace media_router | 38 } // namespace media_router |
36 | 39 |
37 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTES_OBSERVER_H_ | 40 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTES_OBSERVER_H_ |
OLD | NEW |