| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CONTENT_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_BASE_H_ | 5 #ifndef CONTENT_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_BASE_H_ |
| 6 #define CONTENT_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_BASE_H_ | 6 #define CONTENT_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_BASE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "content/common/input/input_event_ack_state.h" | 10 #include "content/common/input/input_event_ack_state.h" |
| 11 #include "content/public/browser/android/synchronous_compositor.h" | 11 #include "content/public/browser/android/synchronous_compositor.h" |
| 12 | 12 |
| 13 namespace IPC { | 13 namespace IPC { |
| 14 class Message; | 14 class Message; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace blink { | 17 namespace blink { |
| 18 class WebInputEvent; | 18 class WebInputEvent; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace cc { | 21 namespace cc { |
| 22 struct BeginFrameArgs; | 22 struct BeginFrameArgs; |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace content { | 25 namespace content { |
| 26 | 26 |
| 27 class RenderWidgetHostViewAndroid; | 27 class RenderWidgetHostViewAndroid; |
| 28 class SynchronousCompositorStreamTextureFactoryImpl; | |
| 29 class WebContents; | 28 class WebContents; |
| 30 struct DidOverscrollParams; | 29 struct DidOverscrollParams; |
| 31 | 30 |
| 32 class SynchronousCompositorBase : public SynchronousCompositor { | 31 class SynchronousCompositorBase : public SynchronousCompositor { |
| 33 public: | 32 public: |
| 34 static std::unique_ptr<SynchronousCompositorBase> Create( | 33 static std::unique_ptr<SynchronousCompositorBase> Create( |
| 35 RenderWidgetHostViewAndroid* rwhva, | 34 RenderWidgetHostViewAndroid* rwhva, |
| 36 WebContents* web_contents); | 35 WebContents* web_contents); |
| 37 | 36 |
| 38 ~SynchronousCompositorBase() override {} | 37 ~SynchronousCompositorBase() override {} |
| 39 | 38 |
| 40 virtual void BeginFrame(const cc::BeginFrameArgs& args) = 0; | 39 virtual void BeginFrame(const cc::BeginFrameArgs& args) = 0; |
| 41 virtual InputEventAckState HandleInputEvent( | 40 virtual InputEventAckState HandleInputEvent( |
| 42 const blink::WebInputEvent& input_event) = 0; | 41 const blink::WebInputEvent& input_event) = 0; |
| 43 virtual void DidOverscroll(const DidOverscrollParams& over_scroll_params) = 0; | 42 virtual void DidOverscroll(const DidOverscrollParams& over_scroll_params) = 0; |
| 44 virtual bool OnMessageReceived(const IPC::Message& message) = 0; | 43 virtual bool OnMessageReceived(const IPC::Message& message) = 0; |
| 45 | 44 |
| 46 virtual void DidBecomeCurrent() = 0; | 45 virtual void DidBecomeCurrent() = 0; |
| 47 }; | 46 }; |
| 48 | 47 |
| 49 } // namespace content | 48 } // namespace content |
| 50 | 49 |
| 51 #endif // CONTENT_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_BASE_H_ | 50 #endif // CONTENT_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_BASE_H_ |
| OLD | NEW |