OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 CONTENT_RENDERER_RENDER_WIDGET_FULLSCREEN_PEPPER_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_FULLSCREEN_PEPPER_H_ |
6 #define CONTENT_RENDERER_RENDER_WIDGET_FULLSCREEN_PEPPER_H_ | 6 #define CONTENT_RENDERER_RENDER_WIDGET_FULLSCREEN_PEPPER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 16 matching lines...) Expand all Loading... |
27 // FullscreenContainer that the plugin instance can callback into to e.g. | 27 // FullscreenContainer that the plugin instance can callback into to e.g. |
28 // invalidate rects. | 28 // invalidate rects. |
29 class RenderWidgetFullscreenPepper : public RenderWidgetFullscreen, | 29 class RenderWidgetFullscreenPepper : public RenderWidgetFullscreen, |
30 public FullscreenContainer { | 30 public FullscreenContainer { |
31 public: | 31 public: |
32 static RenderWidgetFullscreenPepper* Create( | 32 static RenderWidgetFullscreenPepper* Create( |
33 int32_t opener_id, | 33 int32_t opener_id, |
34 CompositorDependencies* compositor_deps, | 34 CompositorDependencies* compositor_deps, |
35 PepperPluginInstanceImpl* plugin, | 35 PepperPluginInstanceImpl* plugin, |
36 const GURL& active_url, | 36 const GURL& active_url, |
37 const blink::WebScreenInfo& screen_info); | 37 const ScreenInfo& screen_info); |
38 | 38 |
39 // pepper::FullscreenContainer API. | 39 // pepper::FullscreenContainer API. |
40 void Invalidate() override; | 40 void Invalidate() override; |
41 void InvalidateRect(const blink::WebRect& rect) override; | 41 void InvalidateRect(const blink::WebRect& rect) override; |
42 void ScrollRect(int dx, int dy, const blink::WebRect& rect) override; | 42 void ScrollRect(int dx, int dy, const blink::WebRect& rect) override; |
43 void Destroy() override; | 43 void Destroy() override; |
44 void PepperDidChangeCursor(const blink::WebCursorInfo& cursor) override; | 44 void PepperDidChangeCursor(const blink::WebCursorInfo& cursor) override; |
45 void SetLayer(blink::WebLayer* layer) override; | 45 void SetLayer(blink::WebLayer* layer) override; |
46 | 46 |
47 // IPC::Listener implementation. This overrides the implementation | 47 // IPC::Listener implementation. This overrides the implementation |
48 // in RenderWidgetFullscreen. | 48 // in RenderWidgetFullscreen. |
49 bool OnMessageReceived(const IPC::Message& msg) override; | 49 bool OnMessageReceived(const IPC::Message& msg) override; |
50 | 50 |
51 // Could be NULL when this widget is closing. | 51 // Could be NULL when this widget is closing. |
52 PepperPluginInstanceImpl* plugin() const { return plugin_; } | 52 PepperPluginInstanceImpl* plugin() const { return plugin_; } |
53 | 53 |
54 MouseLockDispatcher* mouse_lock_dispatcher() const { | 54 MouseLockDispatcher* mouse_lock_dispatcher() const { |
55 return mouse_lock_dispatcher_.get(); | 55 return mouse_lock_dispatcher_.get(); |
56 } | 56 } |
57 | 57 |
58 protected: | 58 protected: |
59 RenderWidgetFullscreenPepper(CompositorDependencies* compositor_deps, | 59 RenderWidgetFullscreenPepper(CompositorDependencies* compositor_deps, |
60 PepperPluginInstanceImpl* plugin, | 60 PepperPluginInstanceImpl* plugin, |
61 const GURL& active_url, | 61 const GURL& active_url, |
62 const blink::WebScreenInfo& screen_info); | 62 const ScreenInfo& screen_info); |
63 ~RenderWidgetFullscreenPepper() override; | 63 ~RenderWidgetFullscreenPepper() override; |
64 | 64 |
65 // RenderWidget API. | 65 // RenderWidget API. |
66 void DidInitiatePaint() override; | 66 void DidInitiatePaint() override; |
67 void DidFlushPaint() override; | 67 void DidFlushPaint() override; |
68 void Close() override; | 68 void Close() override; |
69 void OnResize(const ResizeParams& params) override; | 69 void OnResize(const ResizeParams& params) override; |
70 | 70 |
71 // RenderWidgetFullscreen API. | 71 // RenderWidgetFullscreen API. |
72 blink::WebWidget* CreateWebWidget() override; | 72 blink::WebWidget* CreateWebWidget() override; |
(...skipping 12 matching lines...) Expand all Loading... |
85 blink::WebLayer* layer_; | 85 blink::WebLayer* layer_; |
86 | 86 |
87 std::unique_ptr<MouseLockDispatcher> mouse_lock_dispatcher_; | 87 std::unique_ptr<MouseLockDispatcher> mouse_lock_dispatcher_; |
88 | 88 |
89 DISALLOW_COPY_AND_ASSIGN(RenderWidgetFullscreenPepper); | 89 DISALLOW_COPY_AND_ASSIGN(RenderWidgetFullscreenPepper); |
90 }; | 90 }; |
91 | 91 |
92 } // namespace content | 92 } // namespace content |
93 | 93 |
94 #endif // CONTENT_RENDERER_RENDER_WIDGET_FULLSCREEN_PEPPER_H_ | 94 #endif // CONTENT_RENDERER_RENDER_WIDGET_FULLSCREEN_PEPPER_H_ |
OLD | NEW |