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

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

Issue 2602523002: [Presentation API] Resolve PresentationRequest::reconnect() with existing presentation connection i… (Closed)
Patch Set: remove getExecutionContext() null check in PresentationRequest::reconnect() Created 3 years, 11 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef ExistingPresentationConnectionCallbacks_h
6 #define ExistingPresentationConnectionCallbacks_h
7
8 #include "platform/heap/Handle.h"
9 #include "public/platform/WebCallbacks.h"
10 #include "wtf/Noncopyable.h"
11
12 namespace blink {
13
14 class PresentationConnection;
15 class ScriptPromiseResolver;
16 struct WebPresentationError;
17 struct WebPresentationSessionInfo;
18
19 // ExistingPresentationConnectionCallbacks extends WebCallbacks to resolve the
20 // underlying promise. It takes the PresentationConnection object that
21 // originated the call in its constructor and will resolve underlying promise
22 // with that object.
23 class ExistingPresentationConnectionCallbacks final
24 : public WebCallbacks<const WebPresentationSessionInfo&,
25 const WebPresentationError&> {
26 public:
27 ExistingPresentationConnectionCallbacks(ScriptPromiseResolver*,
28 PresentationConnection*);
29 ~ExistingPresentationConnectionCallbacks() override = default;
30
31 void onSuccess(const WebPresentationSessionInfo&) override;
32 void onError(const WebPresentationError&) override;
33
34 private:
35 Persistent<ScriptPromiseResolver> m_resolver;
36 Persistent<PresentationConnection> m_connection;
37
38 WTF_MAKE_NONCOPYABLE(ExistingPresentationConnectionCallbacks);
39 };
40
41 } // namespace blink
42
43 #endif // ExistingPresentationConnectionCallbacks_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698