| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_CONNECTION_STATE_OBSERVER_H_ | |
| 6 #define CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_CONNECTION_STATE_OBSERVER_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "chrome/browser/media/router/media_route.h" | |
| 10 | |
| 11 namespace media_router { | |
| 12 | |
| 13 class MediaRouter; | |
| 14 | |
| 15 // Base class for observing state changes on a PresentationConnection. | |
| 16 class PresentationConnectionStateObserver { | |
| 17 public: | |
| 18 // |router|: The MediaRouter instance to register this instance with. | |
| 19 // |route_id|: ID of MediaRoute connected to the PresentationConnection to | |
| 20 // be observed. | |
| 21 PresentationConnectionStateObserver(MediaRouter* router, | |
| 22 const MediaRoute::Id& route_id); | |
| 23 virtual ~PresentationConnectionStateObserver(); | |
| 24 | |
| 25 MediaRoute::Id route_id() const { return route_id_; } | |
| 26 | |
| 27 // Invoked when the state of PresentationConnection represented by |route_id_| | |
| 28 // has changed to |state|. | |
| 29 virtual void OnStateChanged(content::PresentationConnectionState state) {} | |
| 30 | |
| 31 private: | |
| 32 MediaRouter* const router_; | |
| 33 const MediaRoute::Id route_id_; | |
| 34 | |
| 35 DISALLOW_COPY_AND_ASSIGN(PresentationConnectionStateObserver); | |
| 36 }; | |
| 37 | |
| 38 } // namespace media_router | |
| 39 | |
| 40 #endif // CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_CONNECTION_STATE_OBSERVER_H_ | |
| OLD | NEW |