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

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: Remove two virtuals 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 enum class CoalesceResult {
25 Coalesced,
26 CannotCoalesce,
27 // Keep iterating on the queue looking for a matching event with the
28 // same modality.
29 KeepSearching,
30 };
31
32 virtual CoalesceResult CoalesceWith(const MainThreadEventQueueTask&) = 0;
33 virtual bool IsWebInputEvent() const = 0;
34 virtual void Dispatch(int routing_id, MainThreadEventQueueClient*) = 0;
35 virtual void EventHandled(
36 int routing_id,
37 blink::scheduler::RendererScheduler* renderer_scheduler,
38 MainThreadEventQueueClient* client,
39 blink::WebInputEvent::Type type,
40 blink::WebInputEventResult result,
41 InputEventAckState ack_result) = 0;
42 };
43
44 } // namespace content
45
46 #endif // CONTENT_RENDERER_INPUT_MAIN_THREAD_EVENT_QUEUE_TASK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698