Chromium Code Reviews| 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 12 matching lines...) Expand all Loading... | |
| 23 #include "content/public/browser/web_contents_observer.h" | 23 #include "content/public/browser/web_contents_observer.h" |
| 24 #include "content/public/browser/web_contents_user_data.h" | 24 #include "content/public/browser/web_contents_user_data.h" |
| 25 | 25 |
| 26 namespace content { | 26 namespace content { |
| 27 class PresentationScreenAvailabilityListener; | 27 class PresentationScreenAvailabilityListener; |
| 28 class WebContents; | 28 class WebContents; |
| 29 struct PresentationSessionInfo; | 29 struct PresentationSessionInfo; |
| 30 struct PresentationSessionMessage; | 30 struct PresentationSessionMessage; |
| 31 } // namespace content | 31 } // namespace content |
| 32 | 32 |
| 33 namespace url { | |
| 34 class Origin; | |
| 35 } // namespace url | |
| 36 | |
| 33 namespace media_router { | 37 namespace media_router { |
| 34 | 38 |
| 35 class MediaRoute; | 39 class MediaRoute; |
| 36 class PresentationFrameManager; | 40 class PresentationFrameManager; |
| 37 class RouteRequestResult; | 41 class RouteRequestResult; |
| 38 | 42 |
| 39 // Implementation of PresentationServiceDelegate that interfaces an instance of | 43 // Implementation of PresentationServiceDelegate that interfaces an instance of |
| 40 // WebContents with the Chrome Media Router. It uses the Media Router to handle | 44 // WebContents with the Chrome Media Router. It uses the Media Router to handle |
| 41 // presentation API calls forwarded from PresentationServiceImpl. In addition, | 45 // presentation API calls forwarded from PresentationServiceImpl. In addition, |
| 42 // it also provides default presentation URL that is required for creating | 46 // it also provides default presentation URL that is required for creating |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 187 const content::PresentationSessionErrorCallback& error_cb, | 191 const content::PresentationSessionErrorCallback& error_cb, |
| 188 const RouteRequestResult& result); | 192 const RouteRequestResult& result); |
| 189 | 193 |
| 190 void OnStartSessionSucceeded( | 194 void OnStartSessionSucceeded( |
| 191 int render_process_id, | 195 int render_process_id, |
| 192 int render_frame_id, | 196 int render_frame_id, |
| 193 const content::PresentationSessionStartedCallback& success_cb, | 197 const content::PresentationSessionStartedCallback& success_cb, |
| 194 const content::PresentationSessionInfo& new_session, | 198 const content::PresentationSessionInfo& new_session, |
| 195 const MediaRoute& route); | 199 const MediaRoute& route); |
| 196 | 200 |
| 201 // Returns true if auto-join requests should be cancelled for |origin|. | |
| 202 bool ShouldOverrideAutoJoinForOrigin(const url::Origin& origin) const; | |
|
mark a. foltz
2016/12/05 21:32:22
ShouldCancelAutoJoinForOrigin?
takumif
2016/12/06 02:21:58
Changed.
| |
| 203 | |
| 197 // References to the WebContents that owns this instance, and associated | 204 // References to the WebContents that owns this instance, and associated |
| 198 // browser profile's MediaRouter instance. | 205 // browser profile's MediaRouter instance. |
| 199 content::WebContents* const web_contents_; | 206 content::WebContents* const web_contents_; |
| 200 MediaRouter* router_; | 207 MediaRouter* router_; |
| 201 | 208 |
| 202 std::unique_ptr<PresentationFrameManager> frame_manager_; | 209 std::unique_ptr<PresentationFrameManager> frame_manager_; |
| 203 | 210 |
| 204 base::WeakPtrFactory<PresentationServiceDelegateImpl> weak_factory_; | 211 base::WeakPtrFactory<PresentationServiceDelegateImpl> weak_factory_; |
| 205 | 212 |
| 206 DISALLOW_COPY_AND_ASSIGN(PresentationServiceDelegateImpl); | 213 DISALLOW_COPY_AND_ASSIGN(PresentationServiceDelegateImpl); |
| 207 }; | 214 }; |
| 208 | 215 |
| 209 } // namespace media_router | 216 } // namespace media_router |
| 210 | 217 |
| 211 #endif // CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_SERVICE_DELEGATE_IMPL_H_ | 218 #endif // CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_SERVICE_DELEGATE_IMPL_H_ |
| OLD | NEW |