| 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_ROUTER_MOJO_IMPL_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_IMPL_H_ |
| 6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_IMPL_H_ | 6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <deque> | 10 #include <deque> |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 | 147 |
| 148 // True if the query has been sent to the MRPM. | 148 // True if the query has been sent to the MRPM. |
| 149 bool is_active = false; | 149 bool is_active = false; |
| 150 | 150 |
| 151 // True if cached result is available. | 151 // True if cached result is available. |
| 152 bool has_cached_result = false; | 152 bool has_cached_result = false; |
| 153 | 153 |
| 154 // Cached list of sinks for the query, if |has_cached_result| is true. | 154 // Cached list of sinks for the query, if |has_cached_result| is true. |
| 155 // Empty otherwise. | 155 // Empty otherwise. |
| 156 std::vector<MediaSink> cached_sink_list; | 156 std::vector<MediaSink> cached_sink_list; |
| 157 std::vector<GURL> origins; |
| 157 base::ObserverList<MediaSinksObserver> observers; | 158 base::ObserverList<MediaSinksObserver> observers; |
| 158 | 159 |
| 159 private: | 160 private: |
| 160 DISALLOW_COPY_AND_ASSIGN(MediaSinksQuery); | 161 DISALLOW_COPY_AND_ASSIGN(MediaSinksQuery); |
| 161 }; | 162 }; |
| 162 | 163 |
| 163 struct MediaRoutesQuery { | 164 struct MediaRoutesQuery { |
| 164 public: | 165 public: |
| 165 MediaRoutesQuery(); | 166 MediaRoutesQuery(); |
| 166 ~MediaRoutesQuery(); | 167 ~MediaRoutesQuery(); |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 // Error handler callback for |binding_| and |media_route_provider_|. | 261 // Error handler callback for |binding_| and |media_route_provider_|. |
| 261 void OnConnectionError(); | 262 void OnConnectionError(); |
| 262 | 263 |
| 263 // interfaces::MediaRouter implementation. | 264 // interfaces::MediaRouter implementation. |
| 264 void RegisterMediaRouteProvider( | 265 void RegisterMediaRouteProvider( |
| 265 interfaces::MediaRouteProviderPtr media_route_provider_ptr, | 266 interfaces::MediaRouteProviderPtr media_route_provider_ptr, |
| 266 const interfaces::MediaRouter::RegisterMediaRouteProviderCallback& | 267 const interfaces::MediaRouter::RegisterMediaRouteProviderCallback& |
| 267 callback) override; | 268 callback) override; |
| 268 void OnIssue(interfaces::IssuePtr issue) override; | 269 void OnIssue(interfaces::IssuePtr issue) override; |
| 269 void OnSinksReceived(const mojo::String& media_source, | 270 void OnSinksReceived(const mojo::String& media_source, |
| 270 mojo::Array<interfaces::MediaSinkPtr> sinks) override; | 271 mojo::Array<interfaces::MediaSinkPtr> sinks, |
| 272 mojo::Array<mojo::String> origins) override; |
| 271 void OnRoutesUpdated(mojo::Array<interfaces::MediaRoutePtr> routes, | 273 void OnRoutesUpdated(mojo::Array<interfaces::MediaRoutePtr> routes, |
| 272 const mojo::String& media_source, | 274 const mojo::String& media_source, |
| 273 mojo::Array<mojo::String> joinable_route_ids) override; | 275 mojo::Array<mojo::String> joinable_route_ids) override; |
| 274 void OnSinkAvailabilityUpdated( | 276 void OnSinkAvailabilityUpdated( |
| 275 interfaces::MediaRouter::SinkAvailability availability) override; | 277 interfaces::MediaRouter::SinkAvailability availability) override; |
| 276 void OnPresentationConnectionStateChanged( | 278 void OnPresentationConnectionStateChanged( |
| 277 const mojo::String& route_id, | 279 const mojo::String& route_id, |
| 278 interfaces::MediaRouter::PresentationConnectionState state) override; | 280 interfaces::MediaRouter::PresentationConnectionState state) override; |
| 279 void OnPresentationConnectionClosed( | 281 void OnPresentationConnectionClosed( |
| 280 const mojo::String& route_id, | 282 const mojo::String& route_id, |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 MediaRouteProviderWakeReason current_wake_reason_; | 374 MediaRouteProviderWakeReason current_wake_reason_; |
| 373 | 375 |
| 374 base::WeakPtrFactory<MediaRouterMojoImpl> weak_factory_; | 376 base::WeakPtrFactory<MediaRouterMojoImpl> weak_factory_; |
| 375 | 377 |
| 376 DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoImpl); | 378 DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoImpl); |
| 377 }; | 379 }; |
| 378 | 380 |
| 379 } // namespace media_router | 381 } // namespace media_router |
| 380 | 382 |
| 381 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_IMPL_H_ | 383 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_IMPL_H_ |
| OLD | NEW |