Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
|
jamesr
2013/06/05 03:57:17
2013
jdduke (slow)
2013/06/05 18:46:31
Done.
| |
| 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 Manager will supply a |handler| when bound to the client. This is valid | |
| 22 // until the manager shuts down, at which point it supplies a null |handler|. | |
| 23 // The client should only makes calls to |handler| on the compositing thread. | |
|
jamesr
2013/06/05 03:57:17
it's normally called the compositor thread, not co
jdduke (slow)
2013/06/05 18:46:31
Done.
| |
| 24 typedef base::Callback<InputEventAckState( | |
| 25 int /*routing_id*/, const WebKit::WebInputEvent&)> Handler; | |
| 26 | |
| 27 // Called from the main thread. | |
| 28 virtual void SetBoundHandler(const Handler& handler) = 0; | |
| 29 | |
| 30 // Called from the compositor thread. | |
| 31 virtual void DidAddInputHandler(int routing_id) = 0; | |
| 32 virtual void DidRemoveInputHandler(int routing_id) = 0; | |
| 33 | |
| 34 protected: | |
| 35 InputHandlerManagerClient() {} | |
| 36 | |
| 37 private: | |
| 38 DISALLOW_COPY_AND_ASSIGN(InputHandlerManagerClient); | |
| 39 }; | |
| 40 | |
| 41 } // namespace content | |
| 42 | |
| 43 #endif // CONTENT_COMMON_GPU_INPUT_HANDLER_MANAGER_CLIENT_H_ | |
| OLD | NEW |