| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 // The caller may pass in nullptr for |web_contents| if tab is not applicable. | 69 // The caller may pass in nullptr for |web_contents| if tab is not applicable. |
| 70 // Each callback in |callbacks| is invoked with a response indicating | 70 // Each callback in |callbacks| is invoked with a response indicating |
| 71 // success or failure, in the order they are listed. | 71 // success or failure, in the order they are listed. |
| 72 virtual void CreateRoute( | 72 virtual void CreateRoute( |
| 73 const MediaSource::Id& source_id, | 73 const MediaSource::Id& source_id, |
| 74 const MediaSink::Id& sink_id, | 74 const MediaSink::Id& sink_id, |
| 75 const GURL& origin, | 75 const GURL& origin, |
| 76 content::WebContents* web_contents, | 76 content::WebContents* web_contents, |
| 77 const std::vector<MediaRouteResponseCallback>& callbacks) = 0; | 77 const std::vector<MediaRouteResponseCallback>& callbacks) = 0; |
| 78 | 78 |
| 79 // Joins an existing route identified by |route_id|. This is used for |
| 80 // non-local routes since no Presentation ID is available. |
| 81 // |source|: The source to route to the existing route. |
| 82 // |route_id|: Route ID of the existing route. |
| 83 // |origin|, |web_contents|: Origin and WebContents of the join route request. |
| 84 // Used for validation when enforcing same-origin and/or same-tab scope. |
| 85 // (See CreateRoute documentation). |
| 86 // Each callback in |callbacks| is invoked with a response indicating |
| 87 // success or failure, in the order they are listed. |
| 88 virtual void JoinRouteByRouteId( |
| 89 const MediaSource::Id& source, |
| 90 const MediaRoute::Id& route_id, |
| 91 const GURL& origin, |
| 92 content::WebContents* web_contents, |
| 93 const std::vector<MediaRouteResponseCallback>& callbacks) = 0; |
| 94 |
| 79 // Joins an existing route identified by |presentation_id|. | 95 // Joins an existing route identified by |presentation_id|. |
| 80 // |source|: The source to route to the existing route. | 96 // |source|: The source to route to the existing route. |
| 81 // |presentation_id|: Presentation ID of the existing route. | 97 // |presentation_id|: Presentation ID of the existing route. |
| 82 // |origin|, |web_contents|: Origin and WebContents of the join route request. | 98 // |origin|, |web_contents|: Origin and WebContents of the join route request. |
| 83 // Used for validation when enforcing same-origin and/or same-tab scope. | 99 // Used for validation when enforcing same-origin and/or same-tab scope. |
| 84 // (See CreateRoute documentation). | 100 // (See CreateRoute documentation). |
| 85 // Each callback in |callbacks| is invoked with a response indicating | 101 // Each callback in |callbacks| is invoked with a response indicating |
| 86 // success or failure, in the order they are listed. | 102 // success or failure, in the order they are listed. |
| 87 virtual void JoinRoute( | 103 virtual void JoinRoute( |
| 88 const MediaSource::Id& source, | 104 const MediaSource::Id& source, |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 LocalMediaRoutesObserver* observer) = 0; | 203 LocalMediaRoutesObserver* observer) = 0; |
| 188 | 204 |
| 189 // Removes the LocalMediaRoutesObserver |observer|. | 205 // Removes the LocalMediaRoutesObserver |observer|. |
| 190 virtual void UnregisterLocalMediaRoutesObserver( | 206 virtual void UnregisterLocalMediaRoutesObserver( |
| 191 LocalMediaRoutesObserver* observer) = 0; | 207 LocalMediaRoutesObserver* observer) = 0; |
| 192 }; | 208 }; |
| 193 | 209 |
| 194 } // namespace media_router | 210 } // namespace media_router |
| 195 | 211 |
| 196 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_ | 212 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_H_ |
| OLD | NEW |