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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
61 void refreshClosedCaptionsButtonVisibility(); | 61 void refreshClosedCaptionsButtonVisibility(); |
62 | 62 |
63 void enteredFullscreen(); | 63 void enteredFullscreen(); |
64 void exitedFullscreen(); | 64 void exitedFullscreen(); |
65 | 65 |
66 void startedCasting(); | 66 void startedCasting(); |
67 void stoppedCasting(); | 67 void stoppedCasting(); |
68 void refreshCastButtonVisibility(); | 68 void refreshCastButtonVisibility(); |
69 void showOverlayCastButton(); | 69 void showOverlayCastButton(); |
70 | 70 |
71 // Update cast button visibility, but don't trigger a relayout. This | |
72 // can e called while stopping DOM objects, during which a layout | |
philipj_slow
2015/07/08 15:06:38
s/e/be/ but also see the comment about this not se
liberato (no reviews please)
2015/07/09 12:10:56
this method is now refreshCastButtonVisibilityWith
| |
73 // can crash. | |
74 void refreshCastButtonVisibilityWithoutLayout(); | |
75 | |
71 void mediaElementFocused(); | 76 void mediaElementFocused(); |
72 | 77 |
73 // Returns the layout object for the part of the controls that should be | 78 // Returns the layout object for the part of the controls that should be |
74 // used for overlap checking during text track layout. May be null. | 79 // used for overlap checking during text track layout. May be null. |
75 LayoutObject* layoutObjectForTextTrackLayout(); | 80 LayoutObject* layoutObjectForTextTrackLayout(); |
76 | 81 |
77 DECLARE_VIRTUAL_TRACE(); | 82 DECLARE_VIRTUAL_TRACE(); |
78 | 83 |
79 private: | 84 private: |
80 explicit MediaControls(HTMLMediaElement&); | 85 explicit MediaControls(HTMLMediaElement&); |
(...skipping 15 matching lines...) Expand all Loading... | |
96 bool shouldHideMediaControls(unsigned behaviorFlags = 0) const; | 101 bool shouldHideMediaControls(unsigned behaviorFlags = 0) const; |
97 void hideMediaControlsTimerFired(Timer<MediaControls>*); | 102 void hideMediaControlsTimerFired(Timer<MediaControls>*); |
98 void startHideMediaControlsTimer(); | 103 void startHideMediaControlsTimer(); |
99 void stopHideMediaControlsTimer(); | 104 void stopHideMediaControlsTimer(); |
100 void resetHideMediaControlsTimer(); | 105 void resetHideMediaControlsTimer(); |
101 | 106 |
102 // Attempts to show the overlay cast button. If it is covered by another | 107 // Attempts to show the overlay cast button. If it is covered by another |
103 // element in the page, it will be hidden. | 108 // element in the page, it will be hidden. |
104 void tryShowOverlayCastButton(); | 109 void tryShowOverlayCastButton(); |
105 | 110 |
111 // For the new UI, hide elements that don't fit, and show those things | |
112 // that we want that do fit. | |
113 void scheduleUpdateControlsVisibilityForSpace(); | |
fs
2015/07/08 09:31:00
I don't know what the "ForSpace" suffix is suppose
liberato (no reviews please)
2015/07/09 12:10:56
it was intended to mean "based on what fits". i'l
| |
114 void updateControlsVisibilityForSpace(); | |
115 | |
106 // Node | 116 // Node |
107 bool isMediaControls() const override { return true; } | 117 bool isMediaControls() const override { return true; } |
108 bool willRespondToMouseMoveEvents() override { return true; } | 118 bool willRespondToMouseMoveEvents() override { return true; } |
109 void defaultEventHandler(Event*) override; | 119 void defaultEventHandler(Event*) override; |
110 bool containsRelatedTarget(Event*); | 120 bool containsRelatedTarget(Event*); |
111 | 121 |
112 RawPtrWillBeMember<HTMLMediaElement> m_mediaElement; | 122 RawPtrWillBeMember<HTMLMediaElement> m_mediaElement; |
113 | 123 |
114 // Media control elements. | 124 // Media control elements. |
115 RawPtrWillBeMember<MediaControlOverlayEnclosureElement> m_overlayEnclosure; | 125 RawPtrWillBeMember<MediaControlOverlayEnclosureElement> m_overlayEnclosure; |
(...skipping 15 matching lines...) Expand all Loading... | |
131 unsigned m_hideTimerBehaviorFlags; | 141 unsigned m_hideTimerBehaviorFlags; |
132 bool m_isMouseOverControls : 1; | 142 bool m_isMouseOverControls : 1; |
133 bool m_isPausedForScrubbing : 1; | 143 bool m_isPausedForScrubbing : 1; |
134 }; | 144 }; |
135 | 145 |
136 DEFINE_ELEMENT_TYPE_CASTS(MediaControls, isMediaControls()); | 146 DEFINE_ELEMENT_TYPE_CASTS(MediaControls, isMediaControls()); |
137 | 147 |
138 } | 148 } |
139 | 149 |
140 #endif | 150 #endif |
OLD | NEW |