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

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

Issue 2386633003: [Media Router] Convert MediaRouter to use GURL for presentation URLs. (Closed)
Patch Set: Respond to dcheng@ comment Created 4 years, 2 months 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 20 matching lines...) Expand all
31 struct PresentationSessionMessage; 31 struct PresentationSessionMessage;
32 } // namespace content 32 } // namespace content
33 33
34 namespace media_router { 34 namespace media_router {
35 35
36 class MediaRoute; 36 class MediaRoute;
37 class MediaSinksObserver; 37 class MediaSinksObserver;
38 class PresentationFrameManager; 38 class PresentationFrameManager;
39 class RouteRequestResult; 39 class RouteRequestResult;
40 40
41 // Implementation of PresentationServiceDelegate that interfaces an 41 // Implementation of PresentationServiceDelegate that interfaces an instance of
42 // instance of WebContents with the Chrome Media Router. It uses the Media 42 // WebContents with the Chrome Media Router. It uses the Media Router to handle
43 // Router to handle presentation API calls forwarded from 43 // presentation API calls forwarded from PresentationServiceImpl. In addition,
44 // PresentationServiceImpl. In addition, it also 44 // it also provides default presentation URL that is required for creating
45 // provides default presentation URL that is required for creating 45 // browser-initiated sessions. It is scoped to the lifetime of a WebContents,
46 // browser-initiated sessions. 46 // and is managed by the associated WebContents.
47 // It is scoped to the lifetime of a WebContents, and is managed by the
48 // associated WebContents.
49 class PresentationServiceDelegateImpl 47 class PresentationServiceDelegateImpl
50 : public content::WebContentsUserData<PresentationServiceDelegateImpl>, 48 : public content::WebContentsUserData<PresentationServiceDelegateImpl>,
51 public content::PresentationServiceDelegate { 49 public content::PresentationServiceDelegate {
52 public: 50 public:
53 // Observer interface for listening to default presentation request 51 // Observer interface for listening to default presentation request
54 // changes for the WebContents. 52 // changes for the WebContents.
55 class DefaultPresentationRequestObserver { 53 class DefaultPresentationRequestObserver {
56 public: 54 public:
57 virtual ~DefaultPresentationRequestObserver() = default; 55 virtual ~DefaultPresentationRequestObserver() = default;
58 56
(...skipping 27 matching lines...) Expand all
86 int render_frame_id, 84 int render_frame_id,
87 content::PresentationScreenAvailabilityListener* listener) override; 85 content::PresentationScreenAvailabilityListener* listener) override;
88 void RemoveScreenAvailabilityListener( 86 void RemoveScreenAvailabilityListener(
89 int render_process_id, 87 int render_process_id,
90 int render_frame_id, 88 int render_frame_id,
91 content::PresentationScreenAvailabilityListener* listener) override; 89 content::PresentationScreenAvailabilityListener* listener) override;
92 void Reset(int render_process_id, int render_frame_id) override; 90 void Reset(int render_process_id, int render_frame_id) override;
93 void SetDefaultPresentationUrls( 91 void SetDefaultPresentationUrls(
94 int render_process_id, 92 int render_process_id,
95 int render_frame_id, 93 int render_frame_id,
96 const std::vector<std::string>& default_presentation_urls, 94 const std::vector<GURL>& default_presentation_urls,
97 const content::PresentationSessionStartedCallback& callback) override; 95 const content::PresentationSessionStartedCallback& callback) override;
98 void StartSession( 96 void StartSession(
99 int render_process_id, 97 int render_process_id,
100 int render_frame_id, 98 int render_frame_id,
101 const std::vector<std::string>& presentation_urls, 99 const std::vector<GURL>& presentation_urls,
102 const content::PresentationSessionStartedCallback& success_cb, 100 const content::PresentationSessionStartedCallback& success_cb,
103 const content::PresentationSessionErrorCallback& error_cb) override; 101 const content::PresentationSessionErrorCallback& error_cb) override;
104 void JoinSession( 102 void JoinSession(
105 int render_process_id, 103 int render_process_id,
106 int render_frame_id, 104 int render_frame_id,
107 const std::vector<std::string>& presentation_urls, 105 const std::vector<GURL>& presentation_urls,
108 const std::string& presentation_id, 106 const std::string& presentation_id,
109 const content::PresentationSessionStartedCallback& success_cb, 107 const content::PresentationSessionStartedCallback& success_cb,
110 const content::PresentationSessionErrorCallback& error_cb) override; 108 const content::PresentationSessionErrorCallback& error_cb) override;
111 void CloseConnection(int render_process_id, 109 void CloseConnection(int render_process_id,
112 int render_frame_id, 110 int render_frame_id,
113 const std::string& presentation_id) override; 111 const std::string& presentation_id) override;
114 void Terminate(int render_process_id, 112 void Terminate(int render_process_id,
115 int render_frame_id, 113 int render_frame_id,
116 const std::string& presentation_id) override; 114 const std::string& presentation_id) override;
117 void ListenForSessionMessages( 115 void ListenForSessionMessages(
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 std::unique_ptr<PresentationFrameManager> frame_manager_; 203 std::unique_ptr<PresentationFrameManager> frame_manager_;
206 204
207 base::WeakPtrFactory<PresentationServiceDelegateImpl> weak_factory_; 205 base::WeakPtrFactory<PresentationServiceDelegateImpl> weak_factory_;
208 206
209 DISALLOW_COPY_AND_ASSIGN(PresentationServiceDelegateImpl); 207 DISALLOW_COPY_AND_ASSIGN(PresentationServiceDelegateImpl);
210 }; 208 };
211 209
212 } // namespace media_router 210 } // namespace media_router
213 211
214 #endif // CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_SERVICE_DELEGATE_IMPL_H_ 212 #endif // CHROME_BROWSER_MEDIA_ROUTER_PRESENTATION_SERVICE_DELEGATE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698