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

Side by Side Diff: content/renderer/input/main_thread_event_queue_task.h

Issue 2765583002: Teach main thread event queue about closures. (Closed)
Patch Set: Fix Mac issue Created 3 years, 8 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_RENDERER_INPUT_MAIN_THREAD_EVENT_QUEUE_TASK_H_
6 #define CONTENT_RENDERER_INPUT_MAIN_THREAD_EVENT_QUEUE_TASK_H_
7
8 #include "content/common/input/input_event_ack_state.h"
9 #include "third_party/WebKit/public/platform/WebInputEvent.h"
10 #include "third_party/WebKit/public/platform/scheduler/renderer/renderer_schedul er.h"
11
12 namespace content {
13
14 class MainThreadEventQueueClient;
15
16 // A work item to execute from the main thread event queue.
17 // The MainThreadEventQueue supports 2 types of tasks (subclasses):
18 // 1) Closures
19 // 2) WebInputEvent
20 class MainThreadEventQueueTask {
21 public:
22 virtual ~MainThreadEventQueueTask() {}
23
24 virtual bool CanCoalesceWith(const MainThreadEventQueueTask&) const = 0;
25 virtual void CoalesceWith(const MainThreadEventQueueTask&) = 0;
26 virtual bool ShouldSkipOverForCoalescing(
27 const MainThreadEventQueueTask&) const = 0;
28 virtual bool IsWebInputEvent() const = 0;
29 virtual void Dispatch(int routing_id, MainThreadEventQueueClient*) = 0;
30 virtual void EventHandled(
31 int routing_id,
32 blink::scheduler::RendererScheduler* renderer_scheduler,
33 MainThreadEventQueueClient* client,
34 blink::WebInputEvent::Type type,
35 blink::WebInputEventResult result,
36 InputEventAckState ack_result) = 0;
37 };
38
39 } // namespace content
40
41 #endif // CONTENT_RENDERER_INPUT_MAIN_THREAD_EVENT_QUEUE_TASK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698