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 void onPlaying(); |
| 278 |
276 private: | 279 private: |
277 explicit MediaControlTimelineElement(MediaControls&); | 280 explicit MediaControlTimelineElement(MediaControls&); |
278 | 281 |
279 void defaultEventHandler(Event*) override; | 282 void defaultEventHandler(Event*) override; |
280 bool keepEventInNode(Event*) override; | 283 bool keepEventInNode(Event*) override; |
| 284 |
| 285 // Width in CSS pixels * pageZoomFactor (ignores CSS transforms for |
| 286 // simplicity; deliberately ignores pinch zoom's pageScaleFactor). |
| 287 int timelineWidth(); |
| 288 |
| 289 MediaControlTimelineMetrics m_metrics; |
281 }; | 290 }; |
282 | 291 |
283 // ---------------------------- | 292 // ---------------------------- |
284 | 293 |
285 class MediaControlFullscreenButtonElement final | 294 class MediaControlFullscreenButtonElement final |
286 : public MediaControlInputElement { | 295 : public MediaControlInputElement { |
287 public: | 296 public: |
288 static MediaControlFullscreenButtonElement* create(MediaControls&); | 297 static MediaControlFullscreenButtonElement* create(MediaControls&); |
289 | 298 |
290 bool willRespondToMouseClickEvents() override { return true; } | 299 bool willRespondToMouseClickEvents() override { return true; } |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 public: | 388 public: |
380 static MediaControlCurrentTimeDisplayElement* create(MediaControls&); | 389 static MediaControlCurrentTimeDisplayElement* create(MediaControls&); |
381 | 390 |
382 private: | 391 private: |
383 explicit MediaControlCurrentTimeDisplayElement(MediaControls&); | 392 explicit MediaControlCurrentTimeDisplayElement(MediaControls&); |
384 }; | 393 }; |
385 | 394 |
386 } // namespace blink | 395 } // namespace blink |
387 | 396 |
388 #endif // MediaControlElements_h | 397 #endif // MediaControlElements_h |
OLD | NEW |