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

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

Issue 2724983006: Media Controls: do not use events but C++ callbacks for insertion/removal from document. (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/shadow/MediaControls.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 /* 1 /*
2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 26 matching lines...) Expand all
37 class MediaControlsOrientationLockDelegate; 37 class MediaControlsOrientationLockDelegate;
38 class MediaControlsWindowEventListener; 38 class MediaControlsWindowEventListener;
39 class ShadowRoot; 39 class ShadowRoot;
40 40
41 class CORE_EXPORT MediaControls final : public HTMLDivElement { 41 class CORE_EXPORT MediaControls final : public HTMLDivElement {
42 public: 42 public:
43 static MediaControls* create(HTMLMediaElement&, ShadowRoot&); 43 static MediaControls* create(HTMLMediaElement&, ShadowRoot&);
44 44
45 HTMLMediaElement& mediaElement() const { return *m_mediaElement; } 45 HTMLMediaElement& mediaElement() const { return *m_mediaElement; }
46 46
47 // Node override.
48 Node::InsertionNotificationRequest insertedInto(ContainerNode*) override;
49 void removedFrom(ContainerNode*) override;
50
47 void reset(); 51 void reset();
48 52
49 void show(); 53 void show();
50 void hide(); 54 void hide();
51 bool isVisible() const; 55 bool isVisible() const;
52 56
53 void beginScrubbing(); 57 void beginScrubbing();
54 void endScrubbing(); 58 void endScrubbing();
55 59
56 void updateCurrentTimeDisplay(); 60 void updateCurrentTimeDisplay();
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 // do fit. This requires that m_panelWidth is current. 163 // do fit. This requires that m_panelWidth is current.
160 void computeWhichControlsFit(); 164 void computeWhichControlsFit();
161 165
162 // Node 166 // Node
163 bool isMediaControls() const override { return true; } 167 bool isMediaControls() const override { return true; }
164 bool willRespondToMouseMoveEvents() override { return true; } 168 bool willRespondToMouseMoveEvents() override { return true; }
165 void defaultEventHandler(Event*) override; 169 void defaultEventHandler(Event*) override;
166 bool containsRelatedTarget(Event*); 170 bool containsRelatedTarget(Event*);
167 171
168 // Methods called by MediaControlsMediaEventListener. 172 // Methods called by MediaControlsMediaEventListener.
169 void onInsertedIntoDocument();
170 void onRemovedFromDocument();
171 void onVolumeChange(); 173 void onVolumeChange();
172 void onFocusIn(); 174 void onFocusIn();
173 void onTimeUpdate(); 175 void onTimeUpdate();
174 void onDurationChange(); 176 void onDurationChange();
175 void onPlay(); 177 void onPlay();
176 void onPause(); 178 void onPause();
177 void onTextTracksAddedOrRemoved(); 179 void onTextTracksAddedOrRemoved();
178 void onTextTracksChanged(); 180 void onTextTracksChanged();
179 void onError(); 181 void onError();
180 void onLoadedMetadata(); 182 void onLoadedMetadata();
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 int m_panelWidth; 225 int m_panelWidth;
224 226
225 bool m_keepShowingUntilTimerFires : 1; 227 bool m_keepShowingUntilTimerFires : 1;
226 }; 228 };
227 229
228 DEFINE_ELEMENT_TYPE_CASTS(MediaControls, isMediaControls()); 230 DEFINE_ELEMENT_TYPE_CASTS(MediaControls, isMediaControls());
229 231
230 } // namespace blink 232 } // namespace blink
231 233
232 #endif 234 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/shadow/MediaControls.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698