| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_MOJO_MEDIA_ROUTE_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTE_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTE_CONTROLLER_H_ | 6 #define CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTE_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/observer_list.h" | 11 #include "base/observer_list.h" |
| 12 #include "chrome/browser/media/router/media_route.h" | 12 #include "chrome/common/media_router/media_route.h" |
| 13 #include "chrome/browser/media/router/mojo/media_controller.mojom.h" | 13 #include "chrome/common/media_router/mojo/media_controller.mojom.h" |
| 14 #include "mojo/public/cpp/bindings/binding.h" | 14 #include "mojo/public/cpp/bindings/binding.h" |
| 15 | 15 |
| 16 namespace media_router { | 16 namespace media_router { |
| 17 | 17 |
| 18 // A controller for a MediaRoute. Forwards commands for controlling the route to | 18 // A controller for a MediaRoute. Forwards commands for controlling the route to |
| 19 // an out-of-process controller. Notifies its observers whenever there is a | 19 // an out-of-process controller. Notifies its observers whenever there is a |
| 20 // change in the route's MediaStatus. | 20 // change in the route's MediaStatus. |
| 21 // | 21 // |
| 22 // It is owned by its observers, each of which holds a scoped_refptr to it. All | 22 // It is owned by its observers, each of which holds a scoped_refptr to it. All |
| 23 // the classes that hold a scoped_refptr must inherit from the Observer class. | 23 // the classes that hold a scoped_refptr must inherit from the Observer class. |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 // Observers that |this| notifies of status updates. The observers share the | 106 // Observers that |this| notifies of status updates. The observers share the |
| 107 // ownership of |this| through scoped_refptr. | 107 // ownership of |this| through scoped_refptr. |
| 108 base::ObserverList<Observer> observers_; | 108 base::ObserverList<Observer> observers_; |
| 109 | 109 |
| 110 DISALLOW_COPY_AND_ASSIGN(MediaRouteController); | 110 DISALLOW_COPY_AND_ASSIGN(MediaRouteController); |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 } // namespace media_router | 113 } // namespace media_router |
| 114 | 114 |
| 115 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTE_CONTROLLER_H_ | 115 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTE_CONTROLLER_H_ |
| OLD | NEW |