OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. |
3 * Copyright (C) 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 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 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 13 matching lines...) Expand all Loading... | |
24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
28 */ | 28 */ |
29 | 29 |
30 #ifndef MediaControlElements_h | 30 #ifndef MediaControlElements_h |
31 #define MediaControlElements_h | 31 #define MediaControlElements_h |
32 | 32 |
33 #include "core/html/shadow/MediaControlElementTypes.h" | 33 #include "core/html/shadow/MediaControlElementTypes.h" |
34 #include "core/html/shadow/MediaControlTimelineMetrics.h" | |
34 #include "public/platform/WebLocalizedString.h" | 35 #include "public/platform/WebLocalizedString.h" |
35 | 36 |
36 namespace blink { | 37 namespace blink { |
37 | 38 |
38 class TextTrack; | 39 class TextTrack; |
39 | 40 |
40 // ---------------------------- | 41 // ---------------------------- |
41 | 42 |
42 class MediaControlPanelElement final : public MediaControlDivElement { | 43 class MediaControlPanelElement final : public MediaControlDivElement { |
43 public: | 44 public: |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
266 public: | 267 public: |
267 static MediaControlTimelineElement* create(MediaControls&); | 268 static MediaControlTimelineElement* create(MediaControls&); |
268 | 269 |
269 bool willRespondToMouseClickEvents() override; | 270 bool willRespondToMouseClickEvents() override; |
270 | 271 |
271 // FIXME: An "earliest possible position" will be needed once that concept | 272 // FIXME: An "earliest possible position" will be needed once that concept |
272 // is supported by HTMLMediaElement, see https://crbug.com/137275 | 273 // is supported by HTMLMediaElement, see https://crbug.com/137275 |
273 void setPosition(double); | 274 void setPosition(double); |
274 void setDuration(double); | 275 void setDuration(double); |
275 | 276 |
277 // Logs width to UMA. Should be called the first time the media is played. | |
278 void recordWidthOnFirstPlay(); | |
279 | |
276 private: | 280 private: |
277 explicit MediaControlTimelineElement(MediaControls&); | 281 explicit MediaControlTimelineElement(MediaControls&); |
278 | 282 |
279 void defaultEventHandler(Event*) override; | 283 void defaultEventHandler(Event*) override; |
280 bool keepEventInNode(Event*) override; | 284 bool keepEventInNode(Event*) override; |
285 | |
286 // Width in CSS pixels * pageZoomFactor (ignores CSS transforms for | |
287 // simplicity; deliberately ignores pinch zoom's pageScaleFactor). | |
288 int timelineWidth(); | |
mlamouri (slow - plz ping)
2017/03/30 21:43:00
getTimelineWidth() to be more Chromium friendly? :
johnme
2017/03/31 13:47:23
Blink style guide says not to: https://sites.googl
| |
289 | |
290 MediaControlTimelineMetrics m_metrics; | |
281 }; | 291 }; |
282 | 292 |
283 // ---------------------------- | 293 // ---------------------------- |
284 | 294 |
285 class MediaControlFullscreenButtonElement final | 295 class MediaControlFullscreenButtonElement final |
286 : public MediaControlInputElement { | 296 : public MediaControlInputElement { |
287 public: | 297 public: |
288 static MediaControlFullscreenButtonElement* create(MediaControls&); | 298 static MediaControlFullscreenButtonElement* create(MediaControls&); |
289 | 299 |
290 bool willRespondToMouseClickEvents() override { return true; } | 300 bool willRespondToMouseClickEvents() override { return true; } |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
379 public: | 389 public: |
380 static MediaControlCurrentTimeDisplayElement* create(MediaControls&); | 390 static MediaControlCurrentTimeDisplayElement* create(MediaControls&); |
381 | 391 |
382 private: | 392 private: |
383 explicit MediaControlCurrentTimeDisplayElement(MediaControls&); | 393 explicit MediaControlCurrentTimeDisplayElement(MediaControls&); |
384 }; | 394 }; |
385 | 395 |
386 } // namespace blink | 396 } // namespace blink |
387 | 397 |
388 #endif // MediaControlElements_h | 398 #endif // MediaControlElements_h |
OLD | NEW |