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

Side by Side Diff: public/platform/modules/presentation/WebPresentationClient.h

Issue 940503002: [PresentationAPI] Added plumbing for start/joinSession from JS to platform (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Full change Created 5 years, 9 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
« no previous file with comments | « Source/modules/presentation/PresentationSessionClientCallbacks.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 WebPresentationClient_h 5 #ifndef WebPresentationClient_h
6 #define WebPresentationClient_h 6 #define WebPresentationClient_h
7 7
8 #include "public/platform/WebCallbacks.h" 8 #include "public/platform/WebCallbacks.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 class WebPresentationController; 12 class WebPresentationController;
13 class WebPresentationSessionClient; 13 class WebPresentationSessionClient;
14 class WebString;
14 struct WebPresentationError; 15 struct WebPresentationError;
15 16
16 // If session was created, callback's onSuccess() is invoked with the informatio n about the 17 // If session was created, callback's onSuccess() is invoked with the informatio n about the
17 // presentation session created by the embedder. Otherwise, onError() is invoked with the error code 18 // presentation session created by the embedder. Otherwise, onError() is invoked with the error code
18 // and message. 19 // and message.
19 using WebPresentationSessionClientCallbacks = WebCallbacks<WebPresentationSessio nClient, WebPresentationError>; 20 using WebPresentationSessionClientCallbacks = WebCallbacks<WebPresentationSessio nClient, WebPresentationError>;
20 21
21 // The implementation the embedder has to provide for the Presentation API to wo rk. 22 // The implementation the embedder has to provide for the Presentation API to wo rk.
22 class WebPresentationClient { 23 class WebPresentationClient {
23 public: 24 public:
24 virtual ~WebPresentationClient() { } 25 virtual ~WebPresentationClient() { }
25 26
26 // Passes the Blink-side delegate to the embedder. 27 // Passes the Blink-side delegate to the embedder.
27 virtual void setController(WebPresentationController*) = 0; 28 virtual void setController(WebPresentationController*) = 0;
28 29
29 // Called when the frame attaches the first event listener to or removes the 30 // Called when the frame attaches the first event listener to or removes the
30 // last event listener from the |availablechange| event. 31 // last event listener from the |availablechange| event.
31 virtual void updateAvailableChangeWatched(bool watched) = 0; 32 virtual void updateAvailableChangeWatched(bool watched) = 0;
33
34 // Called when the frame request to start a new session.
35 // The ownership of the |callbacks| argument is transferred to the embedder.
36 virtual void startSession(const WebString& presentationUrl, const WebString& presentationId, WebPresentationSessionClientCallbacks*) = 0;
37
38 // Called when the frame request to start a new session.
39 // The ownership of the |callbacks| argument is transferred to the embedder.
40 virtual void joinSession(const WebString& presentationUrl, const WebString& presentationId, WebPresentationSessionClientCallbacks*) = 0;
32 }; 41 };
33 42
34 } // namespace blink 43 } // namespace blink
35 44
36 #endif // WebPresentationClient_h 45 #endif // WebPresentationClient_h
OLDNEW
« no previous file with comments | « Source/modules/presentation/PresentationSessionClientCallbacks.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698