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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 bool shouldHideMediaControls(unsigned behaviorFlags = 0) const; | 96 bool shouldHideMediaControls(unsigned behaviorFlags = 0) const; |
97 void hideMediaControlsTimerFired(Timer<MediaControls>*); | 97 void hideMediaControlsTimerFired(Timer<MediaControls>*); |
98 void startHideMediaControlsTimer(); | 98 void startHideMediaControlsTimer(); |
99 void stopHideMediaControlsTimer(); | 99 void stopHideMediaControlsTimer(); |
100 void resetHideMediaControlsTimer(); | 100 void resetHideMediaControlsTimer(); |
101 | 101 |
102 // Attempts to show the overlay cast button. If it is covered by another | 102 // Attempts to show the overlay cast button. If it is covered by another |
103 // element in the page, it will be hidden. | 103 // element in the page, it will be hidden. |
104 void tryShowOverlayCastButton(); | 104 void tryShowOverlayCastButton(); |
105 | 105 |
| 106 // For the new UI, hide elements that don't fit. |
| 107 void hideControlsForSpace(); |
| 108 |
106 // Node | 109 // Node |
107 virtual bool isMediaControls() const override { return true; } | 110 virtual bool isMediaControls() const override { return true; } |
108 virtual bool willRespondToMouseMoveEvents() override { return true; } | 111 virtual bool willRespondToMouseMoveEvents() override { return true; } |
109 virtual void defaultEventHandler(Event*) override; | 112 virtual void defaultEventHandler(Event*) override; |
110 bool containsRelatedTarget(Event*); | 113 bool containsRelatedTarget(Event*); |
111 | 114 |
112 RawPtrWillBeMember<HTMLMediaElement> m_mediaElement; | 115 RawPtrWillBeMember<HTMLMediaElement> m_mediaElement; |
113 | 116 |
114 // Media control elements. | 117 // Media control elements. |
115 RawPtrWillBeMember<MediaControlOverlayEnclosureElement> m_overlayEnclosure; | 118 RawPtrWillBeMember<MediaControlOverlayEnclosureElement> m_overlayEnclosure; |
(...skipping 15 matching lines...) Expand all Loading... |
131 unsigned m_hideTimerBehaviorFlags; | 134 unsigned m_hideTimerBehaviorFlags; |
132 bool m_isMouseOverControls : 1; | 135 bool m_isMouseOverControls : 1; |
133 bool m_isPausedForScrubbing : 1; | 136 bool m_isPausedForScrubbing : 1; |
134 }; | 137 }; |
135 | 138 |
136 DEFINE_ELEMENT_TYPE_CASTS(MediaControls, isMediaControls()); | 139 DEFINE_ELEMENT_TYPE_CASTS(MediaControls, isMediaControls()); |
137 | 140 |
138 } | 141 } |
139 | 142 |
140 #endif | 143 #endif |
OLD | NEW |