Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_CAST_REMOTING_CONNECTOR_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_CAST_REMOTING_CONNECTOR_H_ |
| 6 #define CHROME_BROWSER_MEDIA_CAST_REMOTING_CONNECTOR_H_ | 6 #define CHROME_BROWSER_MEDIA_CAST_REMOTING_CONNECTOR_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 155 void OnDataSendFailed(); | 155 void OnDataSendFailed(); |
| 156 | 156 |
| 157 // MediaRoutesObserver implementation: Scans |routes| to check whether the | 157 // MediaRoutesObserver implementation: Scans |routes| to check whether the |
| 158 // existing remoting route has gone away and/or there is a new remoting route | 158 // existing remoting route has gone away and/or there is a new remoting route |
| 159 // established, and take the necessary actions to notify sources and/or | 159 // established, and take the necessary actions to notify sources and/or |
| 160 // shutdown an active remoting session. | 160 // shutdown an active remoting session. |
| 161 void OnRoutesUpdated( | 161 void OnRoutesUpdated( |
| 162 const std::vector<media_router::MediaRoute>& routes, | 162 const std::vector<media_router::MediaRoute>& routes, |
| 163 const std::vector<media_router::MediaRoute::Id>& ignored) final; | 163 const std::vector<media_router::MediaRoute::Id>& ignored) final; |
| 164 | 164 |
| 165 // The MediaSource ID referring to any remoted content managed by this | |
| 166 // CastRemotingConnector. | |
| 167 const media_router::MediaSource::Id route_source_id_; | |
|
xjz
2016/09/30 00:28:42
nit: media_source_id_?
miu
2016/09/30 02:51:23
Done.
| |
| 168 | |
| 165 // Set of registered RemotingBridges, maintained by RegisterBridge() and | 169 // Set of registered RemotingBridges, maintained by RegisterBridge() and |
| 166 // DeregisterBridge(). These pointers are always valid while they are in this | 170 // DeregisterBridge(). These pointers are always valid while they are in this |
| 167 // set. | 171 // set. |
| 168 std::set<RemotingBridge*> bridges_; | 172 std::set<RemotingBridge*> bridges_; |
| 169 | 173 |
| 170 // Created when the Media Router Cast Provider has created a media remoting | 174 // Created when the Media Router Cast Provider has created a media remoting |
| 171 // route to a sink that supports remoting and is available for use. This | 175 // route to a sink that supports remoting and is available for use. This |
| 172 // observer simply dispatches messages from the Cast Provider and sink back to | 176 // observer simply dispatches messages from the Cast Provider and sink back to |
| 173 // this connector. Once the route is gone, this is reset to null. | 177 // this connector. Once the route is gone, this is reset to null. |
| 174 std::unique_ptr<MessageObserver> message_observer_; | 178 std::unique_ptr<MessageObserver> message_observer_; |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 196 base::WeakPtrFactory<CastRemotingConnector> weak_factory_; | 200 base::WeakPtrFactory<CastRemotingConnector> weak_factory_; |
| 197 | 201 |
| 198 // Key used with the base::SupportsUserData interface to search for an | 202 // Key used with the base::SupportsUserData interface to search for an |
| 199 // instance of CastRemotingConnector owned by a WebContents. | 203 // instance of CastRemotingConnector owned by a WebContents. |
| 200 static const void* const kUserDataKey; | 204 static const void* const kUserDataKey; |
| 201 | 205 |
| 202 DISALLOW_COPY_AND_ASSIGN(CastRemotingConnector); | 206 DISALLOW_COPY_AND_ASSIGN(CastRemotingConnector); |
| 203 }; | 207 }; |
| 204 | 208 |
| 205 #endif // CHROME_BROWSER_MEDIA_CAST_REMOTING_CONNECTOR_H_ | 209 #endif // CHROME_BROWSER_MEDIA_CAST_REMOTING_CONNECTOR_H_ |
| OLD | NEW |