OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. |
3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 #include "TextTrackCue.h" | 42 #include "TextTrackCue.h" |
43 #endif | 43 #endif |
44 | 44 |
45 using namespace std; | 45 using namespace std; |
46 | 46 |
47 namespace WebCore { | 47 namespace WebCore { |
48 | 48 |
49 static const double timeWithoutMouseMovementBeforeHidingControls = 2; | 49 static const double timeWithoutMouseMovementBeforeHidingControls = 2; |
50 | 50 |
51 MediaControlChromiumEnclosureElement::MediaControlChromiumEnclosureElement(Docum
ent* document) | 51 MediaControlChromiumEnclosureElement::MediaControlChromiumEnclosureElement(Docum
ent* document) |
52 : HTMLDivElement(HTMLNames::divTag, document->document()) | 52 : MediaControlElement(document) |
53 , m_mediaController(0) | |
54 { | 53 { |
55 } | 54 } |
56 | 55 |
57 PassRefPtr<MediaControlChromiumEnclosureElement> MediaControlChromiumEnclosureEl
ement::create(Document* document) | 56 PassRefPtr<MediaControlChromiumEnclosureElement> MediaControlChromiumEnclosureEl
ement::create(Document* document) |
58 { | 57 { |
59 return adoptRef(new MediaControlChromiumEnclosureElement(document)); | 58 return adoptRef(new MediaControlChromiumEnclosureElement(document)); |
60 } | 59 } |
61 | 60 |
| 61 MediaControlElementType MediaControlChromiumEnclosureElement::displayType() cons
t |
| 62 { |
| 63 // Mapping onto same MediaControlElementType as panel element, since it has
similar properties. |
| 64 return MediaControlsPanel; |
| 65 } |
| 66 |
| 67 |
62 const AtomicString& MediaControlChromiumEnclosureElement::shadowPseudoId() const | 68 const AtomicString& MediaControlChromiumEnclosureElement::shadowPseudoId() const |
63 { | 69 { |
64 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-enclosure")); | 70 DEFINE_STATIC_LOCAL(AtomicString, id, ("-webkit-media-controls-enclosure")); |
65 return id; | 71 return id; |
66 } | 72 } |
67 | 73 |
68 MediaControlRootElementChromium::MediaControlRootElementChromium(Document* docum
ent) | 74 MediaControlRootElementChromium::MediaControlRootElementChromium(Document* docum
ent) |
69 : MediaControls(document) | 75 : MediaControls(document) |
70 , m_mediaController(0) | 76 , m_mediaController(0) |
71 , m_playButton(0) | 77 , m_playButton(0) |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 { | 499 { |
494 // We only need to update buffering progress when paused, during normal | 500 // We only need to update buffering progress when paused, during normal |
495 // playback playbackProgressed() will take care of it. | 501 // playback playbackProgressed() will take care of it. |
496 if (m_mediaController->paused()) | 502 if (m_mediaController->paused()) |
497 m_timeline->setPosition(m_mediaController->currentTime()); | 503 m_timeline->setPosition(m_mediaController->currentTime()); |
498 } | 504 } |
499 | 505 |
500 } | 506 } |
501 | 507 |
502 #endif | 508 #endif |
OLD | NEW |