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

Side by Side Diff: third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.h

Issue 2345863002: [Blink, RemotePlayback] Rename connect() to prompt() (Closed)
Patch Set: Rebase Created 4 years, 2 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 RemotePlayback_h 5 #ifndef RemotePlayback_h
6 #define RemotePlayback_h 6 #define RemotePlayback_h
7 7
8 #include "bindings/core/v8/ActiveScriptWrappable.h" 8 #include "bindings/core/v8/ActiveScriptWrappable.h"
9 #include "bindings/core/v8/ScriptPromise.h" 9 #include "bindings/core/v8/ScriptPromise.h"
10 #include "core/events/EventTarget.h" 10 #include "core/events/EventTarget.h"
(...skipping 18 matching lines...) Expand all
29 DEFINE_WRAPPERTYPEINFO(); 29 DEFINE_WRAPPERTYPEINFO();
30 USING_GARBAGE_COLLECTED_MIXIN(RemotePlayback); 30 USING_GARBAGE_COLLECTED_MIXIN(RemotePlayback);
31 public: 31 public:
32 static RemotePlayback* create(HTMLMediaElement&); 32 static RemotePlayback* create(HTMLMediaElement&);
33 33
34 // EventTarget implementation. 34 // EventTarget implementation.
35 const WTF::AtomicString& interfaceName() const override; 35 const WTF::AtomicString& interfaceName() const override;
36 ExecutionContext* getExecutionContext() const override; 36 ExecutionContext* getExecutionContext() const override;
37 37
38 ScriptPromise getAvailability(ScriptState*); 38 ScriptPromise getAvailability(ScriptState*);
39 ScriptPromise connect(ScriptState*); 39 ScriptPromise prompt(ScriptState*);
40 40
41 String state() const; 41 String state() const;
42 42
43 // ScriptWrappable implementation. 43 // ScriptWrappable implementation.
44 bool hasPendingActivity() const final; 44 bool hasPendingActivity() const final;
45 45
46 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange); 46 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange);
47 47
48 DECLARE_VIRTUAL_TRACE(); 48 DECLARE_VIRTUAL_TRACE();
49 49
50 private: 50 private:
51 explicit RemotePlayback(HTMLMediaElement&); 51 explicit RemotePlayback(HTMLMediaElement&);
52 52
53 // WebRemotePlaybackClient implementation.
53 void stateChanged(WebRemotePlaybackState) override; 54 void stateChanged(WebRemotePlaybackState) override;
54 void availabilityChanged(bool available) override; 55 void availabilityChanged(bool available) override;
55 void connectCancelled() override; 56 void promptCancelled() override;
56 57
57 WebRemotePlaybackState m_state; 58 WebRemotePlaybackState m_state;
58 bool m_availability; 59 bool m_availability;
59 HeapVector<Member<RemotePlaybackAvailability>> m_availabilityObjects; 60 HeapVector<Member<RemotePlaybackAvailability>> m_availabilityObjects;
60 Member<HTMLMediaElement> m_mediaElement; 61 Member<HTMLMediaElement> m_mediaElement;
61 HeapVector<Member<ScriptPromiseResolver>> m_connectPromiseResolvers; 62 HeapVector<Member<ScriptPromiseResolver>> m_promptPromiseResolvers;
62 }; 63 };
63 64
64 } // namespace blink 65 } // namespace blink
65 66
66 #endif // RemotePlayback_h 67 #endif // RemotePlayback_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698