| 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 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 // Sets the default presentation URL and ID for frame given by | 94 // Sets the default presentation URL and ID for frame given by |
| 95 // |render_process_id| and |render_frame_id|. | 95 // |render_process_id| and |render_frame_id|. |
| 96 // If |default_presentation_url| is empty, the default presentation URL will | 96 // If |default_presentation_url| is empty, the default presentation URL will |
| 97 // be cleared. | 97 // be cleared. |
| 98 virtual void SetDefaultPresentationUrl( | 98 virtual void SetDefaultPresentationUrl( |
| 99 int render_process_id, | 99 int render_process_id, |
| 100 int render_frame_id, | 100 int render_frame_id, |
| 101 const std::string& default_presentation_url, | 101 const std::string& default_presentation_url, |
| 102 const std::string& default_presentation_id) = 0; | 102 const std::string& default_presentation_id) = 0; |
| 103 | 103 |
| 104 // Starts a new presentation session. | 104 // Starts a new presentation session. The presentation id of the session will |
| 105 // be the default presentation ID if any or a generated one otherwise. |
| 105 // Typically, the embedder will allow the user to select a screen to show | 106 // Typically, the embedder will allow the user to select a screen to show |
| 106 // |presentation_url|. | 107 // |presentation_url|. |
| 107 // |render_process_id|, |render_frame_id|: ID of originating frame. | 108 // |render_process_id|, |render_frame_id|: ID of originating frame. |
| 108 // |presentation_url|: URL of the presentation. | 109 // |presentation_url|: URL of the presentation. |
| 109 // |presentation_id|: The caller may provide an non-empty string to be used | |
| 110 // as the ID of the presentation. If empty, the default presentation ID | |
| 111 // will be used. If both are empty, the embedder will automatically generate | |
| 112 // one. | |
| 113 // |success_cb|: Invoked with session info, if presentation session started | 110 // |success_cb|: Invoked with session info, if presentation session started |
| 114 // successfully. | 111 // successfully. |
| 115 // |error_cb|: Invoked with error reason, if presentation session did not | 112 // |error_cb|: Invoked with error reason, if presentation session did not |
| 116 // start. | 113 // start. |
| 117 virtual void StartSession( | 114 virtual void StartSession( |
| 118 int render_process_id, | 115 int render_process_id, |
| 119 int render_frame_id, | 116 int render_frame_id, |
| 120 const std::string& presentation_url, | 117 const std::string& presentation_url, |
| 121 const std::string& presentation_id, | |
| 122 const PresentationSessionSuccessCallback& success_cb, | 118 const PresentationSessionSuccessCallback& success_cb, |
| 123 const PresentationSessionErrorCallback& error_cb) = 0; | 119 const PresentationSessionErrorCallback& error_cb) = 0; |
| 124 | 120 |
| 125 // Joins an existing presentation session. Unlike StartSession(), this | 121 // Joins an existing presentation session. Unlike StartSession(), this |
| 126 // does not bring a screen list UI. | 122 // does not bring a screen list UI. |
| 127 // |render_process_id|, |render_frame_id|: ID for originating frame. | 123 // |render_process_id|, |render_frame_id|: ID for originating frame. |
| 128 // |presentation_url|: URL of the presentation. | 124 // |presentation_url|: URL of the presentation. |
| 129 // |presentation_id|: The ID of the presentation to join. | 125 // |presentation_id|: The ID of the presentation to join. |
| 130 // |success_cb|: Invoked with session info, if presentation session joined | 126 // |success_cb|: Invoked with session info, if presentation session joined |
| 131 // successfully. | 127 // successfully. |
| (...skipping 29 matching lines...) Expand all Loading... |
| 161 virtual void SendMessage( | 157 virtual void SendMessage( |
| 162 int render_process_id, | 158 int render_process_id, |
| 163 int render_frame_id, | 159 int render_frame_id, |
| 164 scoped_ptr<PresentationSessionMessage> message_request, | 160 scoped_ptr<PresentationSessionMessage> message_request, |
| 165 const SendMessageCallback& send_message_cb) = 0; | 161 const SendMessageCallback& send_message_cb) = 0; |
| 166 }; | 162 }; |
| 167 | 163 |
| 168 } // namespace content | 164 } // namespace content |
| 169 | 165 |
| 170 #endif // CONTENT_PUBLIC_BROWSER_PRESENTATION_SERVICE_DELEGATE_H_ | 166 #endif // CONTENT_PUBLIC_BROWSER_PRESENTATION_SERVICE_DELEGATE_H_ |
| OLD | NEW |