Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: chrome/browser/media/router/presentation_service_delegate_impl.h

Issue 2517833004: [MR] Cancel auto-switching from tab mirroring to Cast SDK at page navigation based on user pref (Closed)
Patch Set: Rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 #if !defined(OS_ANDROID)
202 // Returns true if auto-join requests should be cancelled for |origin|.
203 bool ShouldCancelAutoJoinForOrigin(const url::Origin& origin) const;
204 #endif
205
197 // References to the WebContents that owns this instance, and associated 206 // References to the WebContents that owns this instance, and associated
198 // browser profile's MediaRouter instance. 207 // browser profile's MediaRouter instance.
199 content::WebContents* const web_contents_; 208 content::WebContents* const web_contents_;
200 MediaRouter* router_; 209 MediaRouter* router_;
201 210
202 std::unique_ptr<PresentationFrameManager> frame_manager_; 211 std::unique_ptr<PresentationFrameManager> frame_manager_;
203 212
204 base::WeakPtrFactory<PresentationServiceDelegateImpl> weak_factory_; 213 base::WeakPtrFactory<PresentationServiceDelegateImpl> weak_factory_;
205 214
206 DISALLOW_COPY_AND_ASSIGN(PresentationServiceDelegateImpl); 215 DISALLOW_COPY_AND_ASSIGN(PresentationServiceDelegateImpl);
207 }; 216 };
208 217
209 } // namespace media_router 218 } // namespace media_router
210 219
211 #endif // CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_SERVICE_DELEGATE_IMPL_H_ 220 #endif // CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_SERVICE_DELEGATE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698