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 12 matching lines...) Expand all Loading... |
23 namespace content { | 23 namespace content { |
24 class PepperPluginInstanceImpl; | 24 class PepperPluginInstanceImpl; |
25 | 25 |
26 // A RenderWidget that hosts a fullscreen pepper plugin. This provides a | 26 // A RenderWidget that hosts a fullscreen pepper plugin. This provides a |
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 routing_id, |
33 int32_t opener_id, | 34 int32_t opener_id, |
34 CompositorDependencies* compositor_deps, | 35 CompositorDependencies* compositor_deps, |
35 PepperPluginInstanceImpl* plugin, | 36 PepperPluginInstanceImpl* plugin, |
36 const GURL& active_url, | 37 const GURL& active_url, |
37 const ScreenInfo& screen_info); | 38 const ScreenInfo& screen_info); |
38 | 39 |
39 // pepper::FullscreenContainer API. | 40 // pepper::FullscreenContainer API. |
40 void Invalidate() override; | 41 void Invalidate() override; |
41 void InvalidateRect(const blink::WebRect& rect) override; | 42 void InvalidateRect(const blink::WebRect& rect) override; |
42 void ScrollRect(int dx, int dy, const blink::WebRect& rect) override; | 43 void ScrollRect(int dx, int dy, const blink::WebRect& rect) override; |
43 void Destroy() override; | 44 void Destroy() override; |
44 void PepperDidChangeCursor(const blink::WebCursorInfo& cursor) override; | 45 void PepperDidChangeCursor(const blink::WebCursorInfo& cursor) override; |
45 void SetLayer(blink::WebLayer* layer) override; | 46 void SetLayer(blink::WebLayer* layer) override; |
46 | 47 |
47 // IPC::Listener implementation. This overrides the implementation | 48 // IPC::Listener implementation. This overrides the implementation |
48 // in RenderWidgetFullscreen. | 49 // in RenderWidgetFullscreen. |
49 bool OnMessageReceived(const IPC::Message& msg) override; | 50 bool OnMessageReceived(const IPC::Message& msg) override; |
50 | 51 |
51 // Could be NULL when this widget is closing. | 52 // Could be NULL when this widget is closing. |
52 PepperPluginInstanceImpl* plugin() const { return plugin_; } | 53 PepperPluginInstanceImpl* plugin() const { return plugin_; } |
53 | 54 |
54 MouseLockDispatcher* mouse_lock_dispatcher() const { | 55 MouseLockDispatcher* mouse_lock_dispatcher() const { |
55 return mouse_lock_dispatcher_.get(); | 56 return mouse_lock_dispatcher_.get(); |
56 } | 57 } |
57 | 58 |
58 protected: | 59 protected: |
59 RenderWidgetFullscreenPepper(CompositorDependencies* compositor_deps, | 60 RenderWidgetFullscreenPepper(int32_t routing_id, |
| 61 CompositorDependencies* compositor_deps, |
60 PepperPluginInstanceImpl* plugin, | 62 PepperPluginInstanceImpl* plugin, |
61 const GURL& active_url, | 63 const GURL& active_url, |
62 const ScreenInfo& screen_info); | 64 const ScreenInfo& screen_info); |
63 ~RenderWidgetFullscreenPepper() override; | 65 ~RenderWidgetFullscreenPepper() override; |
64 | 66 |
65 // RenderWidget API. | 67 // RenderWidget API. |
66 void DidInitiatePaint() override; | 68 void DidInitiatePaint() override; |
67 void Close() override; | 69 void Close() override; |
68 void OnResize(const ResizeParams& params) override; | 70 void OnResize(const ResizeParams& params) override; |
69 | 71 |
(...skipping 14 matching lines...) Expand all Loading... |
84 blink::WebLayer* layer_; | 86 blink::WebLayer* layer_; |
85 | 87 |
86 std::unique_ptr<MouseLockDispatcher> mouse_lock_dispatcher_; | 88 std::unique_ptr<MouseLockDispatcher> mouse_lock_dispatcher_; |
87 | 89 |
88 DISALLOW_COPY_AND_ASSIGN(RenderWidgetFullscreenPepper); | 90 DISALLOW_COPY_AND_ASSIGN(RenderWidgetFullscreenPepper); |
89 }; | 91 }; |
90 | 92 |
91 } // namespace content | 93 } // namespace content |
92 | 94 |
93 #endif // CONTENT_RENDERER_RENDER_WIDGET_FULLSCREEN_PEPPER_H_ | 95 #endif // CONTENT_RENDERER_RENDER_WIDGET_FULLSCREEN_PEPPER_H_ |
OLD | NEW |