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

Side by Side Diff: third_party/WebKit/Source/core/html/shadow/MediaControlsMediaEventListener.h

Issue 2795783004: Move core MediaControls implementation to modules/media_controls/. (Closed)
Patch Set: rebase Created 3 years, 8 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 MediaControlsMediaEventListener_h 5 #ifndef MediaControlsMediaEventListener_h
6 #define MediaControlsMediaEventListener_h 6 #define MediaControlsMediaEventListener_h
7 7
8 #include "core/CoreExport.h"
8 #include "core/events/EventListener.h" 9 #include "core/events/EventListener.h"
9 10
10 namespace blink { 11 namespace blink {
11 12
12 class HTMLMediaElement; 13 class HTMLMediaElement;
13 class MediaControls; 14 class MediaControls;
14 15
15 class MediaControlsMediaEventListener final : public EventListener { 16 class CORE_EXPORT MediaControlsMediaEventListener final : public EventListener {
16 public: 17 public:
17 explicit MediaControlsMediaEventListener(MediaControls*); 18 explicit MediaControlsMediaEventListener(MediaControls*);
18 19
19 // Called by MediaControls when the HTMLMediaElement is added to a document 20 // Called by MediaControls when the HTMLMediaElement is added to a document
20 // document. All event listeners should be added. 21 // document. All event listeners should be added.
21 void attach(); 22 void attach();
22 23
23 // Called by MediaControls when the HTMLMediaElement is no longer in the 24 // Called by MediaControls when the HTMLMediaElement is no longer in the
24 // document. All event listeners should be removed in order to prepare the 25 // document. All event listeners should be removed in order to prepare the
25 // object to be garbage collected. 26 // object to be garbage collected.
26 void detach(); 27 void detach();
27 28
28 bool operator==(const EventListener&) const override; 29 bool operator==(const EventListener&) const override;
29 30
30 DECLARE_VIRTUAL_TRACE(); 31 DECLARE_VIRTUAL_TRACE();
31 32
32 private: 33 private:
33 HTMLMediaElement& mediaElement(); 34 HTMLMediaElement& mediaElement();
34 35
35 void handleEvent(ExecutionContext*, Event*) override; 36 void handleEvent(ExecutionContext*, Event*) override;
36 37
37 Member<MediaControls> m_mediaControls; 38 Member<MediaControls> m_mediaControls;
38 }; 39 };
39 40
40 } // namespace blink 41 } // namespace blink
41 42
42 #endif // MediaControlsMediaEventListener_h 43 #endif // MediaControlsMediaEventListener_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698