| 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 <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 const std::string& presentation_url, | 84 const std::string& presentation_url, |
| 85 const std::string& presentation_id, | 85 const std::string& presentation_id, |
| 86 const PresentationSessionSuccessCallback& success_cb, | 86 const PresentationSessionSuccessCallback& success_cb, |
| 87 const PresentationSessionErrorCallback& error_cb) override; | 87 const PresentationSessionErrorCallback& error_cb) override; |
| 88 void CloseSession(int render_process_id, | 88 void CloseSession(int render_process_id, |
| 89 int render_frame_id, | 89 int render_frame_id, |
| 90 const std::string& presentation_id) override; | 90 const std::string& presentation_id) override; |
| 91 void ListenForSessionMessages( | 91 void ListenForSessionMessages( |
| 92 int render_process_id, | 92 int render_process_id, |
| 93 int render_frame_id, | 93 int render_frame_id, |
| 94 const PresentationSessionMessageCallback& message_cb) override; | 94 const content::PresentationSessionInfo& session, |
| 95 void SendMessage( | 95 const content::PresentationSessionMessageCallback& message_cb) override; |
| 96 int render_process_id, | 96 void SendMessage(int render_process_id, |
| 97 int render_frame_id, | 97 int render_frame_id, |
| 98 scoped_ptr<content::PresentationSessionMessage> message_request, | 98 const content::PresentationSessionInfo& session, |
| 99 const SendMessageCallback& send_message_cb) override; | 99 scoped_ptr<content::PresentationSessionMessage> message, |
| 100 const SendMessageCallback& send_message_cb) override; |
| 100 void ListenForSessionStateChange( | 101 void ListenForSessionStateChange( |
| 101 int render_process_id, | 102 int render_process_id, |
| 102 int render_frame_id, | 103 int render_frame_id, |
| 103 const content::SessionStateChangedCallback& state_changed_cb) override; | 104 const content::SessionStateChangedCallback& state_changed_cb) override; |
| 104 | 105 |
| 105 // Callback invoked when there is a route response from CreateRoute/JoinRoute | 106 // Callback invoked when there is a route response from CreateRoute/JoinRoute |
| 106 // outside of a Presentation API request. This could be due to | 107 // outside of a Presentation API request. This could be due to |
| 107 // browser action (e.g., browser initiated media router dialog) or | 108 // browser action (e.g., browser initiated media router dialog) or |
| 108 // a media route provider (e.g., autojoin). | 109 // a media route provider (e.g., autojoin). |
| 109 void OnRouteResponse(const MediaRoute* route, const std::string& error); | 110 void OnRouteResponse(const MediaRoute* route, |
| 111 const std::string& presentation_id, |
| 112 const std::string& error); |
| 110 | 113 |
| 111 // Returns the default MediaSource for this tab if there is one. | 114 // Returns the default MediaSource for this tab if there is one. |
| 112 // Returns an empty MediaSource otherwise. | 115 // Returns an empty MediaSource otherwise. |
| 113 MediaSource default_source() const { return default_source_; } | 116 MediaSource default_source() const { return default_source_; } |
| 114 | 117 |
| 115 content::WebContents* web_contents() const { return web_contents_; } | 118 content::WebContents* web_contents() const { return web_contents_; } |
| 116 const GURL& default_frame_url() const { return default_frame_url_; } | 119 const GURL& default_frame_url() const { return default_frame_url_; } |
| 117 | 120 |
| 118 // Observer interface for listening to default MediaSource changes for the | 121 // Observer interface for listening to default MediaSource changes for the |
| 119 // WebContents. | 122 // WebContents. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 // not have a persentation URL, returns the tab mirroring MediaSource. | 156 // not have a persentation URL, returns the tab mirroring MediaSource. |
| 154 MediaSource GetMediaSourceFromListener( | 157 MediaSource GetMediaSourceFromListener( |
| 155 content::PresentationScreenAvailabilityListener* listener); | 158 content::PresentationScreenAvailabilityListener* listener); |
| 156 | 159 |
| 157 void OnJoinRouteResponse(int render_process_id, | 160 void OnJoinRouteResponse(int render_process_id, |
| 158 int render_frame_id, | 161 int render_frame_id, |
| 159 const content::PresentationSessionInfo& session, | 162 const content::PresentationSessionInfo& session, |
| 160 const PresentationSessionSuccessCallback& success_cb, | 163 const PresentationSessionSuccessCallback& success_cb, |
| 161 const PresentationSessionErrorCallback& error_cb, | 164 const PresentationSessionErrorCallback& error_cb, |
| 162 const MediaRoute* route, | 165 const MediaRoute* route, |
| 166 const std::string& presentation_id, |
| 163 const std::string& error_text); | 167 const std::string& error_text); |
| 164 | 168 |
| 165 void OnStartSessionSucceeded( | 169 void OnStartSessionSucceeded( |
| 166 int render_process_id, | 170 int render_process_id, |
| 167 int render_frame_id, | 171 int render_frame_id, |
| 168 const PresentationSessionSuccessCallback& success_cb, | 172 const PresentationSessionSuccessCallback& success_cb, |
| 169 const content::PresentationSessionInfo& new_session, | 173 const content::PresentationSessionInfo& new_session, |
| 170 const MediaRoute::Id& route_id); | 174 const MediaRoute::Id& route_id); |
| 171 | 175 |
| 172 // Returns |true| if the frame is the main frame of |web_contents_|. | 176 // Returns |true| if the frame is the main frame of |web_contents_|. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 195 scoped_ptr<PresentationFrameManager> frame_manager_; | 199 scoped_ptr<PresentationFrameManager> frame_manager_; |
| 196 | 200 |
| 197 base::WeakPtrFactory<PresentationServiceDelegateImpl> weak_factory_; | 201 base::WeakPtrFactory<PresentationServiceDelegateImpl> weak_factory_; |
| 198 | 202 |
| 199 DISALLOW_COPY_AND_ASSIGN(PresentationServiceDelegateImpl); | 203 DISALLOW_COPY_AND_ASSIGN(PresentationServiceDelegateImpl); |
| 200 }; | 204 }; |
| 201 | 205 |
| 202 } // namespace media_router | 206 } // namespace media_router |
| 203 | 207 |
| 204 #endif // CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_SERVICE_DELEGATE_IMPL_H_ | 208 #endif // CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_SERVICE_DELEGATE_IMPL_H_ |
| OLD | NEW |