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

Side by Side Diff: content/renderer/gpu/input_handler_manager_client.h

Issue 15920002: Fix WebView compositor input handling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review Created 7 years, 6 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 (c) 2012 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_GPU_INPUT_HANDLER_MANAGER_CLIENT_H_
6 #define CONTENT_RENDERER_GPU_INPUT_HANDLER_MANAGER_CLIENT_H_
7
8 #include "base/basictypes.h"
9 #include "base/callback_forward.h"
10
11 namespace WebKit {
12 class WebInputEvent;
13 }
14
15 namespace content {
16
17 class InputHandlerManagerClient {
18 public:
19 virtual ~InputHandlerManagerClient() {}
20
21 // The Handler allows the client to forward input events in such a way that
22 // callbacks to DidHandleInputEvent or DidNotHandlerInputEvent are made with
23 // the appropriate response.
24 // The Manager will supply a valid |handler| when bound to the client,
25 // valid until the manager shuts down, when it supplies an empty |handler|.
26 // The client should only makes calls to |handler| on the compositing thread.
27 typedef base::Callback<void(int /*routing_id*/,
jamesr 2013/06/04 06:51:11 i think using a return value here instead of Did(N
jdduke (slow) 2013/06/04 15:46:23 Yeah, just rebased with the new patch that does ju
28 const WebKit::WebInputEvent*)> Handler;
29
30 // Called from the main thread.
31 virtual void SetHandler(const Handler& handler) = 0;
32 virtual void DidAddInputHandler(int routing_id) = 0;
33 virtual void DidRemoveInputHandler(int routing_id) = 0;
34
35 // Called from the compositing thread.
36 virtual void DidHandleInputEvent() = 0;
37 virtual void DidNotHandleInputEvent(bool send_to_widget) = 0;
38
39 protected:
40 InputHandlerManagerClient() {}
41
42 private:
43 DISALLOW_COPY_AND_ASSIGN(InputHandlerManagerClient);
44 };
45
46 } // namespace content
47
48 #endif // CONTENT_COMMON_GPU_INPUT_HANDLER_MANAGER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698