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

Side by Side Diff: third_party/WebKit/Source/web/ExternalPopupMenu.cpp

Issue 2191533003: Refactor Timer classes in preparation for landing FrameTimers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android build fix 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 m_syntheticEvent->type = WebInputEvent::MouseUp; 117 m_syntheticEvent->type = WebInputEvent::MouseUp;
118 m_dispatchEventTimer.startOneShot(0, BLINK_FROM_HERE); 118 m_dispatchEventTimer.startOneShot(0, BLINK_FROM_HERE);
119 // FIXME: show() is asynchronous. If preparing a popup is slow and a 119 // FIXME: show() is asynchronous. If preparing a popup is slow and a
120 // user released the mouse button before showing the popup, mouseup and 120 // user released the mouse button before showing the popup, mouseup and
121 // click events are correctly dispatched. Dispatching the synthetic 121 // click events are correctly dispatched. Dispatching the synthetic
122 // mouseup event is redundant in this case. 122 // mouseup event is redundant in this case.
123 } 123 }
124 #endif 124 #endif
125 } 125 }
126 126
127 void ExternalPopupMenu::dispatchEvent(Timer<ExternalPopupMenu>*) 127 void ExternalPopupMenu::dispatchEvent(TimerBase*)
128 { 128 {
129 m_webView.handleInputEvent(*m_syntheticEvent); 129 m_webView.handleInputEvent(*m_syntheticEvent);
130 m_syntheticEvent.reset(); 130 m_syntheticEvent.reset();
131 } 131 }
132 132
133 void ExternalPopupMenu::hide() 133 void ExternalPopupMenu::hide()
134 { 134 {
135 if (m_ownerElement) 135 if (m_ownerElement)
136 m_ownerElement->popupDidHide(); 136 m_ownerElement->popupDidHide();
137 if (!m_webExternalPopupMenu) 137 if (!m_webExternalPopupMenu)
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 if (ownerElement.itemIsDisplayNone(*items[i])) 300 if (ownerElement.itemIsDisplayNone(*items[i]))
301 continue; 301 continue;
302 if (popupMenuItemIndex == i) 302 if (popupMenuItemIndex == i)
303 return indexTracker; 303 return indexTracker;
304 ++indexTracker; 304 ++indexTracker;
305 } 305 }
306 return -1; 306 return -1;
307 } 307 }
308 308
309 } // namespace blink 309 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698