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

Side by Side Diff: third_party/WebKit/Source/modules/presentation/PresentationAvailabilityCallbacks.h

Issue 2148643002: [Presentation API] Adds DOMString[] constructor to PresentationRequest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix LayoutTests Created 4 years, 5 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 PresentationAvailabilityCallbacks_h 5 #ifndef PresentationAvailabilityCallbacks_h
6 #define PresentationAvailabilityCallbacks_h 6 #define PresentationAvailabilityCallbacks_h
7 7
8 #include "platform/heap/Handle.h" 8 #include "platform/heap/Handle.h"
9 #include "platform/weborigin/KURL.h" 9 #include "platform/weborigin/KURL.h"
10 #include "public/platform/WebCallbacks.h" 10 #include "public/platform/WebCallbacks.h"
11 #include "wtf/Noncopyable.h" 11 #include "wtf/Noncopyable.h"
12 #include "wtf/Vector.h"
12 13
13 namespace blink { 14 namespace blink {
14 15
15 class ScriptPromiseResolver; 16 class ScriptPromiseResolver;
16 struct WebPresentationError; 17 struct WebPresentationError;
17 18
18 // PresentationAvailabilityCallback extends WebCallbacks to resolve the 19 // PresentationAvailabilityCallback extends WebCallbacks to resolve the
19 // underlying promise depending on the result passed to the callback. It takes a 20 // underlying promise depending on the result passed to the callback. It takes a
20 // KURL in its constructor and will pass it to the WebAvailabilityObserver. 21 // WTF::Vector<KURL> in its constructor and will pass it to the WebAvailabilityO bserver.
21 class PresentationAvailabilityCallbacks final : public WebCallbacks<bool, const WebPresentationError&> { 22 class PresentationAvailabilityCallbacks final : public WebCallbacks<bool, const WebPresentationError&> {
22 public: 23 public:
23 PresentationAvailabilityCallbacks(ScriptPromiseResolver*, const KURL&); 24 PresentationAvailabilityCallbacks(ScriptPromiseResolver*, const WTF::Vector< KURL>&);
24 ~PresentationAvailabilityCallbacks() override; 25 ~PresentationAvailabilityCallbacks() override;
25 26
26 void onSuccess(bool value) override; 27 void onSuccess(bool value) override;
27 void onError(const WebPresentationError&) override; 28 void onError(const WebPresentationError&) override;
28 29
29 private: 30 private:
30 Persistent<ScriptPromiseResolver> m_resolver; 31 Persistent<ScriptPromiseResolver> m_resolver;
31 const KURL m_url; 32 const WTF::Vector<KURL> m_urls;
32 33
33 WTF_MAKE_NONCOPYABLE(PresentationAvailabilityCallbacks); 34 WTF_MAKE_NONCOPYABLE(PresentationAvailabilityCallbacks);
34 }; 35 };
35 36
36 } // namespace blink 37 } // namespace blink
37 38
38 #endif // PresentationAvailabilityCallbacks_h 39 #endif // PresentationAvailabilityCallbacks_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698