Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: third_party/WebKit/Source/core/html/shadow/MediaControls.h

Issue 2191533003: Refactor Timer classes in preparation for landing FrameTimers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More build fixes Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 void updatePlayState(); 103 void updatePlayState();
104 104
105 enum HideBehaviorFlags { 105 enum HideBehaviorFlags {
106 IgnoreNone = 0, 106 IgnoreNone = 0,
107 IgnoreVideoHover = 1 << 0, 107 IgnoreVideoHover = 1 << 0,
108 IgnoreFocus = 1 << 1, 108 IgnoreFocus = 1 << 1,
109 IgnoreControlsHover = 1 << 2 109 IgnoreControlsHover = 1 << 2
110 }; 110 };
111 111
112 bool shouldHideMediaControls(unsigned behaviorFlags = 0) const; 112 bool shouldHideMediaControls(unsigned behaviorFlags = 0) const;
113 void hideMediaControlsTimerFired(Timer<MediaControls>*); 113 void hideMediaControlsTimerFired(TimerBase*);
114 void startHideMediaControlsTimer(); 114 void startHideMediaControlsTimer();
115 void stopHideMediaControlsTimer(); 115 void stopHideMediaControlsTimer();
116 void resetHideMediaControlsTimer(); 116 void resetHideMediaControlsTimer();
117 117
118 void panelWidthChangedTimerFired(Timer<MediaControls>*); 118 void panelWidthChangedTimerFired(TimerBase*);
119 119
120 // Hide elements that don't fit, and show those things that we want which 120 // Hide elements that don't fit, and show those things that we want which
121 // do fit. This requires that m_panelWidth is current. 121 // do fit. This requires that m_panelWidth is current.
122 void computeWhichControlsFit(); 122 void computeWhichControlsFit();
123 123
124 // Node 124 // Node
125 bool isMediaControls() const override { return true; } 125 bool isMediaControls() const override { return true; }
126 bool willRespondToMouseMoveEvents() override { return true; } 126 bool willRespondToMouseMoveEvents() override { return true; }
127 void defaultEventHandler(Event*) override; 127 void defaultEventHandler(Event*) override;
128 bool containsRelatedTarget(Event*); 128 bool containsRelatedTarget(Event*);
(...skipping 26 matching lines...) Expand all
155 int m_panelWidth; 155 int m_panelWidth;
156 156
157 bool m_allowHiddenVolumeControls : 1; 157 bool m_allowHiddenVolumeControls : 1;
158 }; 158 };
159 159
160 DEFINE_ELEMENT_TYPE_CASTS(MediaControls, isMediaControls()); 160 DEFINE_ELEMENT_TYPE_CASTS(MediaControls, isMediaControls());
161 161
162 } // namespace blink 162 } // namespace blink
163 163
164 #endif 164 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698