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

Unified Diff: content/common/input/web_input_event_queue.h

Issue 2765583002: Teach main thread event queue about closures. (Closed)
Patch Set: Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: content/common/input/web_input_event_queue.h
diff --git a/content/common/input/web_input_event_queue.h b/content/common/input/web_input_event_queue.h
index 59a4d9a9c42241cf02b3f843c97e306fe197e900..6e642d338c299683e5210e63da85b4881e2969a8 100644
--- a/content/common/input/web_input_event_queue.h
+++ b/content/common/input/web_input_event_queue.h
@@ -23,7 +23,7 @@ class WebInputEventQueue {
void Queue(std::unique_ptr<T> event) {
for (auto last_event_iter = queue_.rbegin();
last_event_iter != queue_.rend(); ++last_event_iter) {
- if (!(*last_event_iter)->event().isSameEventClass(event->event())) {
+ if (!(*last_event_iter)->IsSameEventClass(*event.get())) {
continue;
}
@@ -48,6 +48,11 @@ class WebInputEventQueue {
return result;
}
+ void emplace_front(std::unique_ptr<T> event) {
+ queue_.emplace_front(std::move(event));
+ }
+ void swap(std::deque<std::unique_ptr<T>>* queue) { queue_.swap(*queue); }
+
bool empty() const { return queue_.empty(); }
size_t size() const { return queue_.size(); }
« no previous file with comments | « no previous file | content/renderer/input/input_event_filter.h » ('j') | content/renderer/input/main_thread_event_queue.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698