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_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_ |
6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_ | 6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
| 10 #include <memory> |
10 #include <string> | 11 #include <string> |
11 #include <vector> | 12 #include <vector> |
12 | 13 |
13 #include "base/callback.h" | 14 #include "base/callback.h" |
14 #include "base/callback_list.h" | 15 #include "base/callback_list.h" |
15 #include "base/memory/scoped_vector.h" | 16 #include "base/memory/scoped_vector.h" |
16 #include "base/time/time.h" | 17 #include "base/time/time.h" |
17 #include "chrome/browser/media/router/issue.h" | 18 #include "chrome/browser/media/router/issue.h" |
18 #include "chrome/browser/media/router/media_route.h" | 19 #include "chrome/browser/media/router/media_route.h" |
19 #include "chrome/browser/media/router/media_sink.h" | 20 #include "chrome/browser/media/router/media_sink.h" |
20 #include "chrome/browser/media/router/media_source.h" | 21 #include "chrome/browser/media/router/media_source.h" |
21 #include "chrome/browser/media/router/route_message_observer.h" | 22 #include "chrome/browser/media/router/route_message_observer.h" |
22 #include "components/keyed_service/core/keyed_service.h" | 23 #include "components/keyed_service/core/keyed_service.h" |
23 #include "content/public/browser/presentation_service_delegate.h" | 24 #include "content/public/browser/presentation_service_delegate.h" |
24 | 25 |
| 26 #if !defined(OS_ANDROID) |
| 27 class MediaRouterActionController; |
| 28 #endif |
25 class Profile; | 29 class Profile; |
26 | 30 |
27 namespace content { | 31 namespace content { |
28 class WebContents; | 32 class WebContents; |
29 } | 33 } |
30 | 34 |
31 namespace media_router { | 35 namespace media_router { |
32 | 36 |
33 class IssuesObserver; | 37 class IssuesObserver; |
34 class MediaRoutesObserver; | 38 class MediaRoutesObserver; |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 // caller destroys the Subscription object. | 180 // caller destroys the Subscription object. |
177 virtual std::unique_ptr<PresentationConnectionStateSubscription> | 181 virtual std::unique_ptr<PresentationConnectionStateSubscription> |
178 AddPresentationConnectionStateChangedCallback( | 182 AddPresentationConnectionStateChangedCallback( |
179 const MediaRoute::Id& route_id, | 183 const MediaRoute::Id& route_id, |
180 const content::PresentationConnectionStateChangedCallback& callback) = 0; | 184 const content::PresentationConnectionStateChangedCallback& callback) = 0; |
181 | 185 |
182 // Called when the incognito profile for this instance is being shut down. | 186 // Called when the incognito profile for this instance is being shut down. |
183 // This will terminate all incognito media routes. | 187 // This will terminate all incognito media routes. |
184 virtual void OnIncognitoProfileShutdown() = 0; | 188 virtual void OnIncognitoProfileShutdown() = 0; |
185 | 189 |
| 190 #if !defined(OS_ANDROID) |
| 191 // Returns the controller for media router toolbar action icon. |
| 192 virtual MediaRouterActionController* GetActionController() = 0; |
| 193 #endif |
| 194 |
186 private: | 195 private: |
187 friend class IssuesObserver; | 196 friend class IssuesObserver; |
188 friend class MediaSinksObserver; | 197 friend class MediaSinksObserver; |
189 friend class MediaRoutesObserver; | 198 friend class MediaRoutesObserver; |
190 friend class PresentationConnectionStateObserver; | 199 friend class PresentationConnectionStateObserver; |
191 friend class RouteMessageObserver; | 200 friend class RouteMessageObserver; |
192 | 201 |
193 // The following functions are called by friend Observer classes above. | 202 // The following functions are called by friend Observer classes above. |
194 | 203 |
195 // Registers |observer| with this MediaRouter. |observer| specifies a media | 204 // Registers |observer| with this MediaRouter. |observer| specifies a media |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 | 248 |
240 // Unregisters a previously registered RouteMessagesObserver. |observer| will | 249 // Unregisters a previously registered RouteMessagesObserver. |observer| will |
241 // stop receiving further updates. | 250 // stop receiving further updates. |
242 virtual void UnregisterRouteMessageObserver( | 251 virtual void UnregisterRouteMessageObserver( |
243 RouteMessageObserver* observer) = 0; | 252 RouteMessageObserver* observer) = 0; |
244 }; | 253 }; |
245 | 254 |
246 } // namespace media_router | 255 } // namespace media_router |
247 | 256 |
248 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_ | 257 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_ |
OLD | NEW |