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

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

Issue 1430413003: [Media Router] Connection state change listening redesign part 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
(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_
OLDNEW
« no previous file with comments | « chrome/browser/media/router/mock_media_router.h ('k') | chrome/browser/media/router/presentation_connection_state_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698