OLD | NEW |
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 void reset(); | 45 void reset(); |
46 | 46 |
47 void show(); | 47 void show(); |
48 void hide(); | 48 void hide(); |
49 | 49 |
50 void playbackStarted(); | 50 void playbackStarted(); |
51 void playbackProgressed(); | 51 void playbackProgressed(); |
52 void playbackStopped(); | 52 void playbackStopped(); |
53 | 53 |
| 54 void beginScrubbing(); |
| 55 void endScrubbing(); |
| 56 |
54 void updateCurrentTimeDisplay(); | 57 void updateCurrentTimeDisplay(); |
55 | 58 |
56 void changedMute(); | 59 void changedMute(); |
57 void changedVolume(); | 60 void changedVolume(); |
58 | 61 |
59 void changedClosedCaptionsVisibility(); | 62 void changedClosedCaptionsVisibility(); |
60 void refreshClosedCaptionsButtonVisibility(); | 63 void refreshClosedCaptionsButtonVisibility(); |
61 void closedCaptionTracksChanged(); | 64 void closedCaptionTracksChanged(); |
62 | 65 |
63 void enteredFullscreen(); | 66 void enteredFullscreen(); |
64 void exitedFullscreen(); | 67 void exitedFullscreen(); |
65 | 68 |
66 void updateTextTrackDisplay(); | 69 void updateTextTrackDisplay(); |
67 | 70 |
68 private: | 71 private: |
69 explicit MediaControls(HTMLMediaElement&); | 72 explicit MediaControls(HTMLMediaElement&); |
70 | 73 |
71 bool initializeControls(); | 74 bool initializeControls(); |
72 | 75 |
73 void makeOpaque(); | 76 void makeOpaque(); |
74 void makeTransparent(); | 77 void makeTransparent(); |
75 | 78 |
| 79 void updatePlayState(); |
| 80 |
76 bool shouldHideFullscreenControls(); | 81 bool shouldHideFullscreenControls(); |
77 void hideFullscreenControlsTimerFired(Timer<MediaControls>*); | 82 void hideFullscreenControlsTimerFired(Timer<MediaControls>*); |
78 void startHideFullscreenControlsTimer(); | 83 void startHideFullscreenControlsTimer(); |
79 void stopHideFullscreenControlsTimer(); | 84 void stopHideFullscreenControlsTimer(); |
80 | 85 |
81 void createTextTrackDisplay(); | 86 void createTextTrackDisplay(); |
82 void showTextTrackDisplay(); | 87 void showTextTrackDisplay(); |
83 void hideTextTrackDisplay(); | 88 void hideTextTrackDisplay(); |
84 | 89 |
85 // Node | 90 // Node |
(...skipping 20 matching lines...) Expand all Loading... |
106 MediaControlCurrentTimeDisplayElement* m_currentTimeDisplay; | 111 MediaControlCurrentTimeDisplayElement* m_currentTimeDisplay; |
107 MediaControlTimelineElement* m_timeline; | 112 MediaControlTimelineElement* m_timeline; |
108 MediaControlMuteButtonElement* m_muteButton; | 113 MediaControlMuteButtonElement* m_muteButton; |
109 MediaControlVolumeSliderElement* m_volumeSlider; | 114 MediaControlVolumeSliderElement* m_volumeSlider; |
110 MediaControlToggleClosedCaptionsButtonElement* m_toggleClosedCaptionsButton; | 115 MediaControlToggleClosedCaptionsButtonElement* m_toggleClosedCaptionsButton; |
111 MediaControlFullscreenButtonElement* m_fullScreenButton; | 116 MediaControlFullscreenButtonElement* m_fullScreenButton; |
112 MediaControlTimeRemainingDisplayElement* m_durationDisplay; | 117 MediaControlTimeRemainingDisplayElement* m_durationDisplay; |
113 MediaControlPanelEnclosureElement* m_enclosure; | 118 MediaControlPanelEnclosureElement* m_enclosure; |
114 | 119 |
115 Timer<MediaControls> m_hideFullscreenControlsTimer; | 120 Timer<MediaControls> m_hideFullscreenControlsTimer; |
116 bool m_isFullscreen; | 121 bool m_isFullscreen : 1; |
117 bool m_isMouseOverControls; | 122 bool m_isMouseOverControls : 1; |
| 123 bool m_isPausedForScrubbing : 1; |
118 }; | 124 }; |
119 | 125 |
120 DEFINE_ELEMENT_TYPE_CASTS(MediaControls, isMediaControls()); | 126 DEFINE_ELEMENT_TYPE_CASTS(MediaControls, isMediaControls()); |
121 | 127 |
122 } | 128 } |
123 | 129 |
124 #endif | 130 #endif |
OLD | NEW |