| 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> |
| 11 #include <utility> | 11 #include <utility> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
| 17 #include "base/observer_list.h" | 17 #include "base/observer_list.h" |
| 18 #include "chrome/browser/media/router/media_router.h" | 18 #include "chrome/browser/media/router/media_router.h" |
| 19 #include "chrome/browser/media/router/media_source.h" | 19 #include "chrome/browser/media/router/media_source.h" |
| 20 #include "chrome/browser/media/router/presentation_request.h" | 20 #include "chrome/browser/media/router/presentation_request.h" |
| 21 #include "chrome/browser/media/router/render_frame_host_id.h" | 21 #include "chrome/browser/media/router/render_frame_host_id.h" |
| 22 #include "content/public/browser/presentation_service_delegate.h" | 22 #include "content/public/browser/presentation_service_delegate.h" |
| 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 PresentationConnectionMessage; |
| 31 } // namespace content | 31 } // namespace content |
| 32 | 32 |
| 33 namespace url { | 33 namespace url { |
| 34 class Origin; | 34 class Origin; |
| 35 } // namespace url | 35 } // namespace url |
| 36 | 36 |
| 37 namespace media_router { | 37 namespace media_router { |
| 38 | 38 |
| 39 class MediaRoute; | 39 class MediaRoute; |
| 40 class PresentationFrameManager; | 40 class PresentationFrameManager; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 const std::vector<GURL>& presentation_urls, | 107 const std::vector<GURL>& presentation_urls, |
| 108 const std::string& presentation_id, | 108 const std::string& presentation_id, |
| 109 const content::PresentationSessionStartedCallback& success_cb, | 109 const content::PresentationSessionStartedCallback& success_cb, |
| 110 const content::PresentationSessionErrorCallback& error_cb) override; | 110 const content::PresentationSessionErrorCallback& error_cb) override; |
| 111 void CloseConnection(int render_process_id, | 111 void CloseConnection(int render_process_id, |
| 112 int render_frame_id, | 112 int render_frame_id, |
| 113 const std::string& presentation_id) override; | 113 const std::string& presentation_id) override; |
| 114 void Terminate(int render_process_id, | 114 void Terminate(int render_process_id, |
| 115 int render_frame_id, | 115 int render_frame_id, |
| 116 const std::string& presentation_id) override; | 116 const std::string& presentation_id) override; |
| 117 void ListenForSessionMessages( | 117 void ListenForConnectionMessages( |
| 118 int render_process_id, | 118 int render_process_id, |
| 119 int render_frame_id, | 119 int render_frame_id, |
| 120 const content::PresentationSessionInfo& session, | 120 const content::PresentationSessionInfo& session, |
| 121 const content::PresentationSessionMessageCallback& message_cb) override; | 121 const content::PresentationConnectionMessageCallback& message_cb) |
| 122 void SendMessage(int render_process_id, | 122 override; |
| 123 int render_frame_id, | 123 void SendMessage( |
| 124 const content::PresentationSessionInfo& session, | 124 int render_process_id, |
| 125 std::unique_ptr<content::PresentationSessionMessage> message, | 125 int render_frame_id, |
| 126 const SendMessageCallback& send_message_cb) override; | 126 const content::PresentationSessionInfo& session, |
| 127 std::unique_ptr<content::PresentationConnectionMessage> message, |
| 128 const SendMessageCallback& send_message_cb) override; |
| 127 void ListenForConnectionStateChange( | 129 void ListenForConnectionStateChange( |
| 128 int render_process_id, | 130 int render_process_id, |
| 129 int render_frame_id, | 131 int render_frame_id, |
| 130 const content::PresentationSessionInfo& connection, | 132 const content::PresentationSessionInfo& connection, |
| 131 const content::PresentationConnectionStateChangedCallback& | 133 const content::PresentationConnectionStateChangedCallback& |
| 132 state_changed_cb) override; | 134 state_changed_cb) override; |
| 133 | 135 |
| 134 // Callback invoked when a default PresentationRequest is started from a | 136 // Callback invoked when a default PresentationRequest is started from a |
| 135 // browser-initiated dialog. | 137 // browser-initiated dialog. |
| 136 void OnRouteResponse(const PresentationRequest& request, | 138 void OnRouteResponse(const PresentationRequest& request, |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 std::unique_ptr<PresentationFrameManager> frame_manager_; | 213 std::unique_ptr<PresentationFrameManager> frame_manager_; |
| 212 | 214 |
| 213 base::WeakPtrFactory<PresentationServiceDelegateImpl> weak_factory_; | 215 base::WeakPtrFactory<PresentationServiceDelegateImpl> weak_factory_; |
| 214 | 216 |
| 215 DISALLOW_COPY_AND_ASSIGN(PresentationServiceDelegateImpl); | 217 DISALLOW_COPY_AND_ASSIGN(PresentationServiceDelegateImpl); |
| 216 }; | 218 }; |
| 217 | 219 |
| 218 } // namespace media_router | 220 } // namespace media_router |
| 219 | 221 |
| 220 #endif // CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_SERVICE_DELEGATE_IMPL_H_ | 222 #endif // CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_SERVICE_DELEGATE_IMPL_H_ |
| OLD | NEW |