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

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

Issue 1240763002: CallbackPromiseAdapter types should be more compatible with WebCallbacks (3/3). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 5 years, 4 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 | Annotate | Revision Log
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 #include "public/platform/WebCommon.h" 9 #include "public/platform/WebCommon.h"
10 #include "public/platform/WebPassOwnPtr.h" 10 #include "public/platform/WebPassOwnPtr.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class WebPresentationAvailabilityObserver; 14 class WebPresentationAvailabilityObserver;
15 class WebPresentationController; 15 class WebPresentationController;
16 class WebPresentationSessionClient; 16 class WebPresentationSessionClient;
17 class WebString; 17 class WebString;
18 struct WebPresentationError; 18 struct WebPresentationError;
19 19
20 // If session was created, callback's onSuccess() is invoked with the informatio n about the 20 // If session was created, callback's onSuccess() is invoked with the informatio n about the
21 // presentation session created by the embedder. Otherwise, onError() is invoked with the error code 21 // presentation session created by the embedder. Otherwise, onError() is invoked with the error code
22 // and message. 22 // and message.
23 using WebPresentationSessionClientCallbacks = WebCallbacks<WebPassOwnPtr<WebPres entationSessionClient>, WebPassOwnPtr<WebPresentationError>>; 23 using WebPresentationSessionClientCallbacks = WebCallbacks<WebPassOwnPtr<WebPres entationSessionClient>, const WebPresentationError&>;
24 24
25 // Callback for .getAvailability(). 25 // Callback for .getAvailability().
26 using WebPresentationAvailabilityCallbacks = WebCallbacks<WebPassOwnPtr<bool>, W ebPassOwnPtr<WebPresentationError>>; 26 using WebPresentationAvailabilityCallbacks = WebCallbacks<bool, const WebPresent ationError&>;
27 27
28 // The implementation the embedder has to provide for the Presentation API to wo rk. 28 // The implementation the embedder has to provide for the Presentation API to wo rk.
29 class WebPresentationClient { 29 class WebPresentationClient {
30 public: 30 public:
31 virtual ~WebPresentationClient() { } 31 virtual ~WebPresentationClient() { }
32 32
33 // Passes the Blink-side delegate to the embedder. 33 // Passes the Blink-side delegate to the embedder.
34 virtual void setController(WebPresentationController*) = 0; 34 virtual void setController(WebPresentationController*) = 0;
35 35
36 // Called when the frame requests to start a new session. 36 // Called when the frame requests to start a new session.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 virtual void stopListening(WebPresentationAvailabilityObserver*) = 0; 70 virtual void stopListening(WebPresentationAvailabilityObserver*) = 0;
71 71
72 // Called when a defaultRequest has been set. It sends the url associated 72 // Called when a defaultRequest has been set. It sends the url associated
73 // with it for the embedder. 73 // with it for the embedder.
74 virtual void setDefaultPresentationUrl(const WebString&) = 0; 74 virtual void setDefaultPresentationUrl(const WebString&) = 0;
75 }; 75 };
76 76
77 } // namespace blink 77 } // namespace blink
78 78
79 #endif // WebPresentationClient_h 79 #endif // WebPresentationClient_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698