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

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

Issue 2415443004: [Blink, RemotePlayback]Split onstatechange to separate events (Closed)
Patch Set: Added extra state changes 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 28 matching lines...) Expand all
39 ExecutionContext* getExecutionContext() const override; 39 ExecutionContext* getExecutionContext() const override;
40 40
41 ScriptPromise getAvailability(ScriptState*); 41 ScriptPromise getAvailability(ScriptState*);
42 ScriptPromise prompt(ScriptState*); 42 ScriptPromise prompt(ScriptState*);
43 43
44 String state() const; 44 String state() const;
45 45
46 // ScriptWrappable implementation. 46 // ScriptWrappable implementation.
47 bool hasPendingActivity() const final; 47 bool hasPendingActivity() const final;
48 48
49 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange); 49 DEFINE_ATTRIBUTE_EVENT_LISTENER(connecting);
50 DEFINE_ATTRIBUTE_EVENT_LISTENER(connect);
51 DEFINE_ATTRIBUTE_EVENT_LISTENER(disconnect);
50 52
51 DECLARE_VIRTUAL_TRACE(); 53 DECLARE_VIRTUAL_TRACE();
52 54
53 private: 55 private:
54 friend class RemotePlaybackTest; 56 friend class RemotePlaybackTest;
55 57
56 explicit RemotePlayback(HTMLMediaElement&); 58 explicit RemotePlayback(HTMLMediaElement&);
57 59
58 // WebRemotePlaybackClient implementation. 60 // WebRemotePlaybackClient implementation.
59 void stateChanged(WebRemotePlaybackState) override; 61 void stateChanged(WebRemotePlaybackState) override;
60 void availabilityChanged(bool available) override; 62 void availabilityChanged(bool available) override;
61 void promptCancelled() override; 63 void promptCancelled() override;
62 64
63 WebRemotePlaybackState m_state; 65 WebRemotePlaybackState m_state;
64 bool m_availability; 66 bool m_availability;
65 HeapVector<Member<RemotePlaybackAvailability>> m_availabilityObjects; 67 HeapVector<Member<RemotePlaybackAvailability>> m_availabilityObjects;
66 Member<HTMLMediaElement> m_mediaElement; 68 Member<HTMLMediaElement> m_mediaElement;
67 Member<ScriptPromiseResolver> m_promptPromiseResolver; 69 Member<ScriptPromiseResolver> m_promptPromiseResolver;
68 }; 70 };
69 71
70 } // namespace blink 72 } // namespace blink
71 73
72 #endif // RemotePlayback_h 74 #endif // RemotePlayback_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698