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

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

Issue 2559673002: Remove ContextLifecycleObserver from RemotePlayback (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "bindings/core/v8/TraceWrapperMember.h" 10 #include "bindings/core/v8/TraceWrapperMember.h"
11 #include "core/dom/ContextLifecycleObserver.h"
12 #include "core/events/EventTarget.h" 11 #include "core/events/EventTarget.h"
13 #include "modules/ModulesExport.h" 12 #include "modules/ModulesExport.h"
14 #include "platform/heap/Handle.h" 13 #include "platform/heap/Handle.h"
15 #include "public/platform/modules/remoteplayback/WebRemotePlaybackAvailability.h " 14 #include "public/platform/modules/remoteplayback/WebRemotePlaybackAvailability.h "
16 #include "public/platform/modules/remoteplayback/WebRemotePlaybackClient.h" 15 #include "public/platform/modules/remoteplayback/WebRemotePlaybackClient.h"
17 #include "public/platform/modules/remoteplayback/WebRemotePlaybackState.h" 16 #include "public/platform/modules/remoteplayback/WebRemotePlaybackState.h"
18 #include "wtf/Compiler.h" 17 #include "wtf/Compiler.h"
19 #include "wtf/text/AtomicString.h" 18 #include "wtf/text/AtomicString.h"
20 #include "wtf/text/WTFString.h" 19 #include "wtf/text/WTFString.h"
21 20
22 namespace blink { 21 namespace blink {
23 22
24 class ExecutionContext; 23 class ExecutionContext;
25 class HTMLMediaElement; 24 class HTMLMediaElement;
26 class RemotePlaybackAvailabilityCallback; 25 class RemotePlaybackAvailabilityCallback;
27 class ScriptPromiseResolver; 26 class ScriptPromiseResolver;
28 class ScriptState; 27 class ScriptState;
29 28
30 class MODULES_EXPORT RemotePlayback final 29 class MODULES_EXPORT RemotePlayback final
31 : public EventTargetWithInlineData, 30 : public EventTargetWithInlineData,
32 public ActiveScriptWrappable, 31 public ActiveScriptWrappable,
33 public ContextLifecycleObserver,
34 NON_EXPORTED_BASE(public WebRemotePlaybackClient) { 32 NON_EXPORTED_BASE(public WebRemotePlaybackClient) {
35 DEFINE_WRAPPERTYPEINFO(); 33 DEFINE_WRAPPERTYPEINFO();
36 USING_GARBAGE_COLLECTED_MIXIN(RemotePlayback); 34 USING_GARBAGE_COLLECTED_MIXIN(RemotePlayback);
37 35
38 public: 36 public:
39 static RemotePlayback* create(HTMLMediaElement&); 37 static RemotePlayback* create(HTMLMediaElement&);
40 38
41 // Notifies this object that disableRemotePlayback attribute was set on the 39 // Notifies this object that disableRemotePlayback attribute was set on the
42 // corresponding media element. 40 // corresponding media element.
43 void remotePlaybackDisabled(); 41 void remotePlaybackDisabled();
(...skipping 17 matching lines...) Expand all
61 59
62 // Shows the UI allowing user to change the remote playback state of the media 60 // Shows the UI allowing user to change the remote playback state of the media
63 // element (by picking a remote playback device from the list, for example). 61 // element (by picking a remote playback device from the list, for example).
64 ScriptPromise prompt(ScriptState*); 62 ScriptPromise prompt(ScriptState*);
65 63
66 String state() const; 64 String state() const;
67 65
68 // ScriptWrappable implementation. 66 // ScriptWrappable implementation.
69 bool hasPendingActivity() const final; 67 bool hasPendingActivity() const final;
70 68
71 void contextDestroyed() override;
72
73 DEFINE_ATTRIBUTE_EVENT_LISTENER(connecting); 69 DEFINE_ATTRIBUTE_EVENT_LISTENER(connecting);
74 DEFINE_ATTRIBUTE_EVENT_LISTENER(connect); 70 DEFINE_ATTRIBUTE_EVENT_LISTENER(connect);
75 DEFINE_ATTRIBUTE_EVENT_LISTENER(disconnect); 71 DEFINE_ATTRIBUTE_EVENT_LISTENER(disconnect);
76 72
77 DECLARE_VIRTUAL_TRACE(); 73 DECLARE_VIRTUAL_TRACE();
78 DECLARE_VIRTUAL_TRACE_WRAPPERS(); 74 DECLARE_VIRTUAL_TRACE_WRAPPERS();
79 75
80 private: 76 private:
81 friend class V8RemotePlayback; 77 friend class V8RemotePlayback;
82 friend class RemotePlaybackTest; 78 friend class RemotePlaybackTest;
(...skipping 20 matching lines...) Expand all
103 WebRemotePlaybackAvailability m_availability; 99 WebRemotePlaybackAvailability m_availability;
104 HeapHashMap<int, TraceWrapperMember<RemotePlaybackAvailabilityCallback>> 100 HeapHashMap<int, TraceWrapperMember<RemotePlaybackAvailabilityCallback>>
105 m_availabilityCallbacks; 101 m_availabilityCallbacks;
106 Member<HTMLMediaElement> m_mediaElement; 102 Member<HTMLMediaElement> m_mediaElement;
107 Member<ScriptPromiseResolver> m_promptPromiseResolver; 103 Member<ScriptPromiseResolver> m_promptPromiseResolver;
108 }; 104 };
109 105
110 } // namespace blink 106 } // namespace blink
111 107
112 #endif // RemotePlayback_h 108 #endif // RemotePlayback_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698