Chromium Code Reviews| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 113 void ToggleOverflowMenu(); | 113 void ToggleOverflowMenu(); |
| 114 bool OverflowMenuVisible(); | 114 bool OverflowMenuVisible(); |
| 115 | 115 |
| 116 void ShowOverlayCastButtonIfNeeded(); | 116 void ShowOverlayCastButtonIfNeeded(); |
| 117 | 117 |
| 118 // Methods call by the scrubber. | 118 // Methods call by the scrubber. |
| 119 void BeginScrubbing(); | 119 void BeginScrubbing(); |
| 120 void EndScrubbing(); | 120 void EndScrubbing(); |
| 121 void UpdateCurrentTimeDisplay(); | 121 void UpdateCurrentTimeDisplay(); |
| 122 | 122 |
| 123 bool CanShow() const; | |
|
mlamouri (slow - plz ping)
2017/07/25 17:29:08
What does that mean?
Khushal
2017/08/03 02:41:21
It returns the status of the panel. That is, wheth
| |
| 124 bool IsVisible() const; | |
| 125 void StartHideMediaControlsIfNecessary(); | |
| 126 | |
| 123 DECLARE_VIRTUAL_TRACE(); | 127 DECLARE_VIRTUAL_TRACE(); |
| 124 | 128 |
| 125 private: | 129 private: |
| 126 // MediaControlsMediaEventListener is a component that is listening to events | 130 // MediaControlsMediaEventListener is a component that is listening to events |
| 127 // and calling the appropriate callback on MediaControlsImpl. The object is | 131 // and calling the appropriate callback on MediaControlsImpl. The object is |
| 128 // split from MedaiControlsImpl to reduce boilerplate and ease reading. In | 132 // split from MedaiControlsImpl to reduce boilerplate and ease reading. In |
| 129 // order to not expose accessors only for this component, a friendship is | 133 // order to not expose accessors only for this component, a friendship is |
| 130 // declared. | 134 // declared. |
| 131 friend class MediaControlsMediaEventListener; | 135 friend class MediaControlsMediaEventListener; |
| 132 // Same as above but handles the menus hiding when the window is interacted | 136 // Same as above but handles the menus hiding when the window is interacted |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 150 | 154 |
| 151 // Notify us that our controls enclosure has changed size. | 155 // Notify us that our controls enclosure has changed size. |
| 152 void NotifyElementSizeChanged(DOMRectReadOnly* new_size); | 156 void NotifyElementSizeChanged(DOMRectReadOnly* new_size); |
| 153 | 157 |
| 154 explicit MediaControlsImpl(HTMLMediaElement&); | 158 explicit MediaControlsImpl(HTMLMediaElement&); |
| 155 | 159 |
| 156 void InitializeControls(); | 160 void InitializeControls(); |
| 157 | 161 |
| 158 void MakeOpaque(); | 162 void MakeOpaque(); |
| 159 void MakeTransparent(); | 163 void MakeTransparent(); |
| 160 bool IsVisible() const; | |
| 161 | 164 |
| 162 void UpdatePlayState(); | 165 void UpdatePlayState(); |
| 163 | 166 |
| 164 enum HideBehaviorFlags { | 167 enum HideBehaviorFlags { |
| 165 kIgnoreNone = 0, | 168 kIgnoreNone = 0, |
| 166 kIgnoreVideoHover = 1 << 0, | 169 kIgnoreVideoHover = 1 << 0, |
| 167 kIgnoreFocus = 1 << 1, | 170 kIgnoreFocus = 1 << 1, |
| 168 kIgnoreControlsHover = 1 << 2, | 171 kIgnoreControlsHover = 1 << 2, |
| 169 kIgnoreWaitForTimer = 1 << 3, | 172 kIgnoreWaitForTimer = 1 << 3, |
| 170 }; | 173 }; |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 257 IntSize size_; | 260 IntSize size_; |
| 258 | 261 |
| 259 bool keep_showing_until_timer_fires_ : 1; | 262 bool keep_showing_until_timer_fires_ : 1; |
| 260 }; | 263 }; |
| 261 | 264 |
| 262 DEFINE_ELEMENT_TYPE_CASTS(MediaControlsImpl, IsMediaControls()); | 265 DEFINE_ELEMENT_TYPE_CASTS(MediaControlsImpl, IsMediaControls()); |
| 263 | 266 |
| 264 } // namespace blink | 267 } // namespace blink |
| 265 | 268 |
| 266 #endif | 269 #endif |
| OLD | NEW |