| OLD | NEW |
| (Empty) |
| 1 // Copyright 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 WEBKIT_COMPOSITOR_BINDINGS_WEB_TO_CCINPUT_HANDLER_ADAPTER_H_ | |
| 6 #define WEBKIT_COMPOSITOR_BINDINGS_WEB_TO_CCINPUT_HANDLER_ADAPTER_H_ | |
| 7 | |
| 8 #include "base/memory/scoped_ptr.h" | |
| 9 #include "cc/input/input_handler.h" | |
| 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebInputHandler.h" | |
| 11 #include "webkit/compositor_bindings/webkit_compositor_bindings_export.h" | |
| 12 | |
| 13 namespace WebKit { | |
| 14 | |
| 15 class WebToCCInputHandlerAdapter : public cc::InputHandlerClient { | |
| 16 public: | |
| 17 WEBKIT_COMPOSITOR_BINDINGS_EXPORT static | |
| 18 scoped_ptr<WebToCCInputHandlerAdapter> create( | |
| 19 scoped_ptr<WebInputHandler>); | |
| 20 virtual ~WebToCCInputHandlerAdapter(); | |
| 21 | |
| 22 // cc::InputHandlerClient implementation. | |
| 23 virtual void BindToHandler(cc::InputHandler*) OVERRIDE; | |
| 24 virtual void Animate(base::TimeTicks time) OVERRIDE; | |
| 25 virtual void MainThreadHasStoppedFlinging() OVERRIDE; | |
| 26 | |
| 27 private: | |
| 28 explicit WebToCCInputHandlerAdapter(scoped_ptr<WebInputHandler>); | |
| 29 | |
| 30 class HandlerAdapter; | |
| 31 scoped_ptr<HandlerAdapter> handler_adapter_; | |
| 32 scoped_ptr<WebInputHandler> handler_; | |
| 33 | |
| 34 DISALLOW_COPY_AND_ASSIGN(WebToCCInputHandlerAdapter); | |
| 35 }; | |
| 36 | |
| 37 } // namespace webkit | |
| 38 | |
| 39 #endif // WEBKIT_COMPOSITOR_BINDINGS_WEB_TO_CCINPUT_HANDLER_ADAPTER_H_ | |
| OLD | NEW |