| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WEBKIT_COMPOSITOR_BINDINGS_WEB_TO_CCINPUT_HANDLER_ADAPTER_H_ | 5 #ifndef WEBKIT_COMPOSITOR_BINDINGS_WEB_TO_CCINPUT_HANDLER_ADAPTER_H_ |
| 6 #define WEBKIT_COMPOSITOR_BINDINGS_WEB_TO_CCINPUT_HANDLER_ADAPTER_H_ | 6 #define WEBKIT_COMPOSITOR_BINDINGS_WEB_TO_CCINPUT_HANDLER_ADAPTER_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "cc/input/input_handler.h" | 9 #include "cc/input/input_handler.h" |
| 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebInputHandler.h" | 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebInputHandler.h" |
| 11 #include "webkit/compositor_bindings/webkit_compositor_bindings_export.h" | 11 #include "webkit/compositor_bindings/webkit_compositor_bindings_export.h" |
| 12 | 12 |
| 13 namespace WebKit { | 13 namespace WebKit { |
| 14 | 14 |
| 15 class WebToCCInputHandlerAdapter : public cc::InputHandlerClient { | 15 class WebToCCInputHandlerAdapter : public cc::InputHandlerClient { |
| 16 public: | 16 public: |
| 17 WEBKIT_COMPOSITOR_BINDINGS_EXPORT static | 17 WEBKIT_COMPOSITOR_BINDINGS_EXPORT static |
| 18 scoped_ptr<WebToCCInputHandlerAdapter> create( | 18 scoped_ptr<WebToCCInputHandlerAdapter> create( |
| 19 scoped_ptr<WebInputHandler>); | 19 scoped_ptr<WebInputHandler>); |
| 20 virtual ~WebToCCInputHandlerAdapter(); | 20 virtual ~WebToCCInputHandlerAdapter(); |
| 21 | 21 |
| 22 // cc::InputHandlerClient implementation. | 22 // cc::InputHandlerClient implementation. |
| 23 virtual void BindToHandler(cc::InputHandler*) OVERRIDE; | |
| 24 virtual void Animate(base::TimeTicks time) OVERRIDE; | 23 virtual void Animate(base::TimeTicks time) OVERRIDE; |
| 25 virtual void MainThreadHasStoppedFlinging() OVERRIDE; | 24 virtual void MainThreadHasStoppedFlinging() OVERRIDE; |
| 26 | 25 |
| 27 private: | 26 private: |
| 28 explicit WebToCCInputHandlerAdapter(scoped_ptr<WebInputHandler>); | 27 explicit WebToCCInputHandlerAdapter(scoped_ptr<WebInputHandler>); |
| 29 | 28 |
| 30 class HandlerAdapter; | 29 class HandlerAdapter; |
| 31 scoped_ptr<HandlerAdapter> handler_adapter_; | 30 scoped_ptr<HandlerAdapter> handler_adapter_; |
| 32 scoped_ptr<WebInputHandler> handler_; | 31 scoped_ptr<WebInputHandler> handler_; |
| 33 | 32 |
| 34 DISALLOW_COPY_AND_ASSIGN(WebToCCInputHandlerAdapter); | 33 DISALLOW_COPY_AND_ASSIGN(WebToCCInputHandlerAdapter); |
| 35 }; | 34 }; |
| 36 | 35 |
| 37 } // namespace webkit | 36 } // namespace webkit |
| 38 | 37 |
| 39 #endif // WEBKIT_COMPOSITOR_BINDINGS_WEB_TO_CCINPUT_HANDLER_ADAPTER_H_ | 38 #endif // WEBKIT_COMPOSITOR_BINDINGS_WEB_TO_CCINPUT_HANDLER_ADAPTER_H_ |
| OLD | NEW |