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

Side by Side Diff: content/public/browser/presentation_service_delegate.h

Issue 2174693004: [Presentation API] Add support to content/ for multiple URLs per PresentationRequest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 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 CONTENT_PUBLIC_BROWSER_PRESENTATION_SERVICE_DELEGATE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_PRESENTATION_SERVICE_DELEGATE_H_
6 #define CONTENT_PUBLIC_BROWSER_PRESENTATION_SERVICE_DELEGATE_H_ 6 #define CONTENT_PUBLIC_BROWSER_PRESENTATION_SERVICE_DELEGATE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 PresentationScreenAvailabilityListener* listener) = 0; 100 PresentationScreenAvailabilityListener* listener) = 0;
101 101
102 // Resets the presentation state for the frame given by |render_process_id| 102 // Resets the presentation state for the frame given by |render_process_id|
103 // and |render_frame_id|. 103 // and |render_frame_id|.
104 // This unregisters all listeners associated with the given frame, and clears 104 // This unregisters all listeners associated with the given frame, and clears
105 // the default presentation URL and ID set for the frame. 105 // the default presentation URL and ID set for the frame.
106 virtual void Reset( 106 virtual void Reset(
107 int render_process_id, 107 int render_process_id,
108 int render_frame_id) = 0; 108 int render_frame_id) = 0;
109 109
110 // Sets the default presentation URL for frame given by |render_process_id| 110 // Sets the default presentation URLs for frame given by |render_process_id|
111 // and |render_frame_id|. When the default presentation is started on this 111 // and |render_frame_id|. When the default presentation is started on this
112 // frame, |callback| will be invoked with the corresponding 112 // frame, |callback| will be invoked with the corresponding
113 // PresentationSessionInfo object. 113 // PresentationSessionInfo object.
114 // If |default_presentation_url| is empty, the default presentation URL will 114 // If |default_presentation_urls| is empty, the default presentation URLs will
115 // be cleared and the previously registered callback (if any) will be removed. 115 // be cleared and the previously registered callback (if any) will be removed.
116 virtual void SetDefaultPresentationUrl( 116 // TODO(crbug.com/632623): Use GURL instead of std::string for URLs
117 virtual void SetDefaultPresentationUrls(
117 int render_process_id, 118 int render_process_id,
118 int render_frame_id, 119 int render_frame_id,
119 const std::string& default_presentation_url, 120 const std::vector<std::string>& default_presentation_urls,
120 const PresentationSessionStartedCallback& callback) = 0; 121 const PresentationSessionStartedCallback& callback) = 0;
121 122
122 // Starts a new presentation session. The presentation id of the session will 123 // Starts a new presentation session. The presentation id of the session will
123 // be the default presentation ID if any or a generated one otherwise. 124 // be the default presentation ID if any or a generated one otherwise.
124 // Typically, the embedder will allow the user to select a screen to show 125 // Typically, the embedder will allow the user to select a screen to show
125 // |presentation_url|. 126 // one of the |presentation_urls|.
126 // |render_process_id|, |render_frame_id|: ID of originating frame. 127 // |render_process_id|, |render_frame_id|: ID of originating frame.
127 // |presentation_url|: URL of the presentation. 128 // |presentation_urls|: Possible URLs for the presentation.
128 // |success_cb|: Invoked with session info, if presentation session started 129 // |success_cb|: Invoked with session info, if presentation session started
129 // successfully. 130 // successfully.
130 // |error_cb|: Invoked with error reason, if presentation session did not 131 // |error_cb|: Invoked with error reason, if presentation session did not
131 // start. 132 // start.
133 // TODO(crbug.com/632623): Use GURL instead of std::string for URLs
132 virtual void StartSession( 134 virtual void StartSession(
133 int render_process_id, 135 int render_process_id,
134 int render_frame_id, 136 int render_frame_id,
135 const std::string& presentation_url, 137 const std::vector<std::string>& presentation_urls,
136 const PresentationSessionStartedCallback& success_cb, 138 const PresentationSessionStartedCallback& success_cb,
137 const PresentationSessionErrorCallback& error_cb) = 0; 139 const PresentationSessionErrorCallback& error_cb) = 0;
138 140
139 // Joins an existing presentation session. Unlike StartSession(), this 141 // Joins an existing presentation session. Unlike StartSession(), this
140 // does not bring a screen list UI. 142 // does not bring a screen list UI.
141 // |render_process_id|, |render_frame_id|: ID for originating frame. 143 // |render_process_id|, |render_frame_id|: ID for originating frame.
142 // |presentation_url|: URL of the presentation. 144 // |presentation_urls|: Possible URLs of the presentation.
143 // |presentation_id|: The ID of the presentation to join. 145 // |presentation_id|: The ID of the presentation to join.
144 // |success_cb|: Invoked with session info, if presentation session joined 146 // |success_cb|: Invoked with session info, if presentation session joined
145 // successfully. 147 // successfully.
146 // |error_cb|: Invoked with error reason, if joining failed. 148 // |error_cb|: Invoked with error reason, if joining failed.
149 // TODO(crbug.com/632623): Use GURL instead of std::string for URLs
147 virtual void JoinSession( 150 virtual void JoinSession(
148 int render_process_id, 151 int render_process_id,
149 int render_frame_id, 152 int render_frame_id,
150 const std::string& presentation_url, 153 const std::vector<std::string>& presentation_urls,
151 const std::string& presentation_id, 154 const std::string& presentation_id,
152 const PresentationSessionStartedCallback& success_cb, 155 const PresentationSessionStartedCallback& success_cb,
153 const PresentationSessionErrorCallback& error_cb) = 0; 156 const PresentationSessionErrorCallback& error_cb) = 0;
154 157
155 // Closes an existing presentation connection. 158 // Closes an existing presentation connection.
156 // |render_process_id|, |render_frame_id|: ID for originating frame. 159 // |render_process_id|, |render_frame_id|: ID for originating frame.
157 // |presentation_id|: The ID of the presentation to close. 160 // |presentation_id|: The ID of the presentation to close.
158 virtual void CloseConnection(int render_process_id, 161 virtual void CloseConnection(int render_process_id,
159 int render_frame_id, 162 int render_frame_id,
160 const std::string& presentation_id) = 0; 163 const std::string& presentation_id) = 0;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 virtual void ListenForConnectionStateChange( 201 virtual void ListenForConnectionStateChange(
199 int render_process_id, 202 int render_process_id,
200 int render_frame_id, 203 int render_frame_id,
201 const PresentationSessionInfo& connection, 204 const PresentationSessionInfo& connection,
202 const PresentationConnectionStateChangedCallback& state_changed_cb) = 0; 205 const PresentationConnectionStateChangedCallback& state_changed_cb) = 0;
203 }; 206 };
204 207
205 } // namespace content 208 } // namespace content
206 209
207 #endif // CONTENT_PUBLIC_BROWSER_PRESENTATION_SERVICE_DELEGATE_H_ 210 #endif // CONTENT_PUBLIC_BROWSER_PRESENTATION_SERVICE_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698