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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 59 |
60 void changedClosedCaptionsVisibility(); | 60 void changedClosedCaptionsVisibility(); |
61 void refreshClosedCaptionsButtonVisibility(); | 61 void refreshClosedCaptionsButtonVisibility(); |
62 void closedCaptionTracksChanged(); | 62 void closedCaptionTracksChanged(); |
63 | 63 |
64 void enteredFullscreen(); | 64 void enteredFullscreen(); |
65 void exitedFullscreen(); | 65 void exitedFullscreen(); |
66 | 66 |
67 void updateTextTrackDisplay(); | 67 void updateTextTrackDisplay(); |
68 | 68 |
| 69 void mediaElementFocused(); |
| 70 |
69 virtual void trace(Visitor*) OVERRIDE; | 71 virtual void trace(Visitor*) OVERRIDE; |
70 | 72 |
71 private: | 73 private: |
72 explicit MediaControls(HTMLMediaElement&); | 74 explicit MediaControls(HTMLMediaElement&); |
73 | 75 |
74 bool initializeControls(); | 76 bool initializeControls(); |
75 | 77 |
76 void makeOpaque(); | 78 void makeOpaque(); |
77 void makeTransparent(); | 79 void makeTransparent(); |
78 | 80 |
79 void updatePlayState(); | 81 void updatePlayState(); |
80 | 82 |
81 bool shouldHideMediaControls(); | 83 enum HideBehaviorFlags { |
| 84 IgnoreVideoHover = 1 << 0, |
| 85 IgnoreFocus = 1 << 1 |
| 86 }; |
| 87 |
| 88 bool shouldHideMediaControls(unsigned behaviorFlags = 0) const; |
82 void hideMediaControlsTimerFired(Timer<MediaControls>*); | 89 void hideMediaControlsTimerFired(Timer<MediaControls>*); |
83 void startHideMediaControlsTimer(); | 90 void startHideMediaControlsTimer(); |
84 void stopHideMediaControlsTimer(); | 91 void stopHideMediaControlsTimer(); |
85 | 92 |
86 void createTextTrackDisplay(); | 93 void createTextTrackDisplay(); |
87 void showTextTrackDisplay(); | 94 void showTextTrackDisplay(); |
88 void hideTextTrackDisplay(); | 95 void hideTextTrackDisplay(); |
89 | 96 |
90 // Node | 97 // Node |
91 virtual bool isMediaControls() const OVERRIDE { return true; } | 98 virtual bool isMediaControls() const OVERRIDE { return true; } |
(...skipping 28 matching lines...) Expand all Loading... |
120 Timer<MediaControls> m_hideMediaControlsTimer; | 127 Timer<MediaControls> m_hideMediaControlsTimer; |
121 bool m_isMouseOverControls : 1; | 128 bool m_isMouseOverControls : 1; |
122 bool m_isPausedForScrubbing : 1; | 129 bool m_isPausedForScrubbing : 1; |
123 }; | 130 }; |
124 | 131 |
125 DEFINE_ELEMENT_TYPE_CASTS(MediaControls, isMediaControls()); | 132 DEFINE_ELEMENT_TYPE_CASTS(MediaControls, isMediaControls()); |
126 | 133 |
127 } | 134 } |
128 | 135 |
129 #endif | 136 #endif |
OLD | NEW |