Update function names in BrowserContextKeyedServiceFactory::GetServiceForBrowserConte...
[chromium-blink-merge.git] / content / renderer / gpu / input_handler_manager_client.h
bloba98a3594e4ab9864f7e045e8ebe6d6634b93d593
1 // Copyright 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.
5 #ifndef CONTENT_RENDERER_GPU_INPUT_HANDLER_MANAGER_CLIENT_H_
6 #define CONTENT_RENDERER_GPU_INPUT_HANDLER_MANAGER_CLIENT_H_
8 #include "base/basictypes.h"
9 #include "base/callback_forward.h"
10 #include "content/common/content_export.h"
11 #include "ui/gfx/vector2d_f.h"
13 namespace ui {
14 struct LatencyInfo;
17 namespace cc {
18 class InputHandler;
21 namespace WebKit {
22 class WebInputEvent;
25 namespace content {
27 class CONTENT_EXPORT InputHandlerManagerClient {
28 public:
29 virtual ~InputHandlerManagerClient() {}
31 // The Manager will supply a |handler| when bound to the client. This is valid
32 // until the manager shuts down, at which point it supplies a null |handler|.
33 // The client should only makes calls to |handler| on the compositor thread.
34 typedef base::Callback<
35 InputEventAckState(int /*routing_id*/,
36 const WebKit::WebInputEvent*,
37 const ui::LatencyInfo& latency_info)> Handler;
39 // Called from the main thread.
40 virtual void SetBoundHandler(const Handler& handler) = 0;
42 // Called from the compositor thread.
43 virtual void DidAddInputHandler(int routing_id,
44 cc::InputHandler* input_handler) = 0;
45 virtual void DidRemoveInputHandler(int routing_id) = 0;
46 virtual void DidOverscroll(int routing_id,
47 gfx::Vector2dF accumulated_overscroll,
48 gfx::Vector2dF current_fling_velocity) = 0;
50 protected:
51 InputHandlerManagerClient() {}
53 private:
54 DISALLOW_COPY_AND_ASSIGN(InputHandlerManagerClient);
57 } // namespace content
59 #endif // CONTENT_COMMON_GPU_INPUT_HANDLER_MANAGER_CLIENT_H_