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_MOJO_MEDIA_ROUTER_MOJO_IMPL_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_IMPL_H_ |
6 #define CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_IMPL_H_ | 6 #define CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_IMPL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <deque> | 10 #include <deque> |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
107 void SearchSinks(const MediaSink::Id& sink_id, | 107 void SearchSinks(const MediaSink::Id& sink_id, |
108 const MediaSource::Id& source_id, | 108 const MediaSource::Id& source_id, |
109 const std::string& search_input, | 109 const std::string& search_input, |
110 const std::string& domain, | 110 const std::string& domain, |
111 MediaSinkSearchResponseCallback sink_callback) override; | 111 MediaSinkSearchResponseCallback sink_callback) override; |
112 void ProvideSinks(const std::string& provider_name, | 112 void ProvideSinks(const std::string& provider_name, |
113 std::vector<MediaSinkInternal> sinks) override; | 113 std::vector<MediaSinkInternal> sinks) override; |
114 scoped_refptr<MediaRouteController> GetRouteController( | 114 scoped_refptr<MediaRouteController> GetRouteController( |
115 const MediaRoute::Id& route_id) override; | 115 const MediaRoute::Id& route_id) override; |
116 | 116 |
117 // TODO(crbug.com/597778): Remove this getter. | |
imcheng
2017/07/07 21:15:43
Seems this patch will fix crbug.com/727993 as well
takumif
2017/07/07 21:58:58
Done.
| |
118 const std::string& media_route_provider_extension_id() const; | |
119 | |
120 void set_instance_id_for_test(const std::string& instance_id) { | 117 void set_instance_id_for_test(const std::string& instance_id) { |
121 instance_id_ = instance_id; | 118 instance_id_ = instance_id; |
122 } | 119 } |
123 | 120 |
124 private: | 121 private: |
125 friend class MediaRouterFactory; | 122 friend class MediaRouterFactory; |
126 friend class MediaRouterMojoExtensionTest; | 123 friend class MediaRouterMojoExtensionTest; |
127 friend class MediaRouterMojoTest; | 124 friend class MediaRouterMojoTest; |
128 FRIEND_TEST_ALL_PREFIXES(MediaRouterMojoImplTest, JoinRoute); | 125 FRIEND_TEST_ALL_PREFIXES(MediaRouterMojoImplTest, JoinRoute); |
129 FRIEND_TEST_ALL_PREFIXES(MediaRouterMojoImplTest, JoinRouteTimedOutFails); | 126 FRIEND_TEST_ALL_PREFIXES(MediaRouterMojoImplTest, JoinRouteTimedOutFails); |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
210 RUN, | 207 RUN, |
211 }; | 208 }; |
212 | 209 |
213 // Standard constructor, used by | 210 // Standard constructor, used by |
214 // MediaRouterMojoImplFactory::GetApiForBrowserContext. | 211 // MediaRouterMojoImplFactory::GetApiForBrowserContext. |
215 MediaRouterMojoImpl(content::BrowserContext* context, | 212 MediaRouterMojoImpl(content::BrowserContext* context, |
216 FirewallCheck check_firewall = FirewallCheck::RUN); | 213 FirewallCheck check_firewall = FirewallCheck::RUN); |
217 | 214 |
218 // Binds |this| to a Mojo interface request, so that clients can acquire a | 215 // Binds |this| to a Mojo interface request, so that clients can acquire a |
219 // handle to a MediaRouterMojoImpl instance via the Mojo service connector. | 216 // handle to a MediaRouterMojoImpl instance via the Mojo service connector. |
220 // Stores the ID of |extension| in |media_route_provider_extension_id_|. | 217 // Passes the extension's ID to the event page request manager. |
221 void BindToMojoRequest( | 218 void BindToMojoRequest( |
222 mojo::InterfaceRequest<mojom::MediaRouter> request, | 219 mojo::InterfaceRequest<mojom::MediaRouter> request, |
223 const extensions::Extension& extension); | 220 const extensions::Extension& extension); |
224 | 221 |
225 // MediaRouter implementation. | 222 // MediaRouter implementation. |
226 bool RegisterMediaSinksObserver(MediaSinksObserver* observer) override; | 223 bool RegisterMediaSinksObserver(MediaSinksObserver* observer) override; |
227 void UnregisterMediaSinksObserver(MediaSinksObserver* observer) override; | 224 void UnregisterMediaSinksObserver(MediaSinksObserver* observer) override; |
228 void RegisterMediaRoutesObserver(MediaRoutesObserver* observer) override; | 225 void RegisterMediaRoutesObserver(MediaRoutesObserver* observer) override; |
229 void UnregisterMediaRoutesObserver(MediaRoutesObserver* observer) override; | 226 void UnregisterMediaRoutesObserver(MediaRoutesObserver* observer) override; |
230 void RegisterIssuesObserver(IssuesObserver* observer) override; | 227 void RegisterIssuesObserver(IssuesObserver* observer) override; |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
432 #endif | 429 #endif |
433 | 430 |
434 base::WeakPtrFactory<MediaRouterMojoImpl> weak_factory_; | 431 base::WeakPtrFactory<MediaRouterMojoImpl> weak_factory_; |
435 | 432 |
436 DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoImpl); | 433 DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoImpl); |
437 }; | 434 }; |
438 | 435 |
439 } // namespace media_router | 436 } // namespace media_router |
440 | 437 |
441 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_IMPL_H_ | 438 #endif // CHROME_BROWSER_MEDIA_ROUTER_MOJO_MEDIA_ROUTER_MOJO_IMPL_H_ |
OLD | NEW |