OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 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 #include "content/common/content_export.h" |
| 11 |
| 12 namespace WebKit { |
| 13 class WebInputEvent; |
| 14 } |
| 15 |
| 16 namespace content { |
| 17 |
| 18 class CONTENT_EXPORT InputHandlerManagerClient { |
| 19 public: |
| 20 virtual ~InputHandlerManagerClient() {} |
| 21 |
| 22 // The Manager will supply a |handler| when bound to the client. This is valid |
| 23 // until the manager shuts down, at which point it supplies a null |handler|. |
| 24 // The client should only makes calls to |handler| on the compositor thread. |
| 25 typedef base::Callback<InputEventAckState( |
| 26 int /*routing_id*/, const WebKit::WebInputEvent*)> Handler; |
| 27 |
| 28 // Called from the main thread. |
| 29 virtual void SetBoundHandler(const Handler& handler) = 0; |
| 30 |
| 31 // Called from the compositor thread. |
| 32 virtual void DidAddInputHandler(int routing_id) = 0; |
| 33 virtual void DidRemoveInputHandler(int routing_id) = 0; |
| 34 |
| 35 protected: |
| 36 InputHandlerManagerClient() {} |
| 37 |
| 38 private: |
| 39 DISALLOW_COPY_AND_ASSIGN(InputHandlerManagerClient); |
| 40 }; |
| 41 |
| 42 } // namespace content |
| 43 |
| 44 #endif // CONTENT_COMMON_GPU_INPUT_HANDLER_MANAGER_CLIENT_H_ |
OLD | NEW |