| 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_PRESENTATION_SERVICE_DELEGATE_IMPL_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_SERVICE_DELEGATE_IMPL_H_ |
| 6 #define CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_SERVICE_DELEGATE_IMPL_H_ | 6 #define CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_SERVICE_DELEGATE_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 // Sets the default presentation request for the owning WebContents and | 221 // Sets the default presentation request for the owning WebContents and |
| 222 // notifies observers of changes. | 222 // notifies observers of changes. |
| 223 void SetDefaultPresentationRequest( | 223 void SetDefaultPresentationRequest( |
| 224 const PresentationRequest& default_presentation_request); | 224 const PresentationRequest& default_presentation_request); |
| 225 | 225 |
| 226 // Clears the default presentation request for the owning WebContents and | 226 // Clears the default presentation request for the owning WebContents and |
| 227 // notifies observers of changes. Also resets | 227 // notifies observers of changes. Also resets |
| 228 // |default_presentation_started_callback_|. | 228 // |default_presentation_started_callback_|. |
| 229 void ClearDefaultPresentationRequest(); | 229 void ClearDefaultPresentationRequest(); |
| 230 | 230 |
| 231 // Returns |true| if the given frame is the main frame of the associated | |
| 232 // WebContents. | |
| 233 // NOTE: This method will be removed in an upcoming patch. | |
| 234 bool IsMainFrame(const RenderFrameHostId& render_frame_host_id) const; | |
| 235 | |
| 236 // Returns the ID of the route corresponding to |presentation_id| in the given | 231 // Returns the ID of the route corresponding to |presentation_id| in the given |
| 237 // frame, or empty if no such route exist. | 232 // frame, or empty if no such route exist. |
| 238 MediaRoute::Id GetRouteId(const RenderFrameHostId& render_frame_host_id, | 233 MediaRoute::Id GetRouteId(const RenderFrameHostId& render_frame_host_id, |
| 239 const std::string& presentation_id) const; | 234 const std::string& presentation_id) const; |
| 240 | 235 |
| 241 #if !defined(OS_ANDROID) | 236 #if !defined(OS_ANDROID) |
| 242 // Returns true if auto-join requests should be cancelled for |origin|. | 237 // Returns true if auto-join requests should be cancelled for |origin|. |
| 243 bool ShouldCancelAutoJoinForOrigin(const url::Origin& origin) const; | 238 bool ShouldCancelAutoJoinForOrigin(const url::Origin& origin) const; |
| 244 #endif | 239 #endif |
| 245 | 240 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 270 PresentationServiceDelegateObservers observers_; | 265 PresentationServiceDelegateObservers observers_; |
| 271 | 266 |
| 272 base::WeakPtrFactory<PresentationServiceDelegateImpl> weak_factory_; | 267 base::WeakPtrFactory<PresentationServiceDelegateImpl> weak_factory_; |
| 273 | 268 |
| 274 DISALLOW_COPY_AND_ASSIGN(PresentationServiceDelegateImpl); | 269 DISALLOW_COPY_AND_ASSIGN(PresentationServiceDelegateImpl); |
| 275 }; | 270 }; |
| 276 | 271 |
| 277 } // namespace media_router | 272 } // namespace media_router |
| 278 | 273 |
| 279 #endif // CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_SERVICE_DELEGATE_IMPL_H_ | 274 #endif // CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_SERVICE_DELEGATE_IMPL_H_ |
| OLD | NEW |