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