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> |
11 | 11 |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "content/renderer/mouse_lock_dispatcher.h" | 13 #include "content/renderer/mouse_lock_dispatcher.h" |
14 #include "content/renderer/pepper/fullscreen_container.h" | 14 #include "content/renderer/pepper/fullscreen_container.h" |
15 #include "content/renderer/render_widget_fullscreen.h" | 15 #include "content/renderer/render_widget.h" |
16 #include "third_party/WebKit/public/web/WebWidget.h" | 16 #include "third_party/WebKit/public/web/WebWidget.h" |
17 #include "url/gurl.h" | 17 #include "url/gurl.h" |
18 | 18 |
19 namespace blink { | 19 namespace blink { |
20 class WebLayer; | 20 class WebLayer; |
21 } | 21 } |
22 | 22 |
23 namespace content { | 23 namespace content { |
24 class CompositorDependencies; | |
24 class PepperPluginInstanceImpl; | 25 class PepperPluginInstanceImpl; |
26 class RenderFrameImpl; | |
alexmos
2016/11/17 09:51:09
where is this needed?
ncarter (slow)
2016/11/17 19:33:11
Was cruft; removed.
| |
25 | 27 |
26 // A RenderWidget that hosts a fullscreen pepper plugin. This provides a | 28 // A RenderWidget that hosts a fullscreen pepper plugin. This provides a |
27 // FullscreenContainer that the plugin instance can callback into to e.g. | 29 // FullscreenContainer that the plugin instance can callback into to e.g. |
28 // invalidate rects. | 30 // invalidate rects. |
29 class RenderWidgetFullscreenPepper : public RenderWidgetFullscreen, | 31 class RenderWidgetFullscreenPepper : public RenderWidget, |
30 public FullscreenContainer { | 32 public FullscreenContainer { |
31 public: | 33 public: |
32 static RenderWidgetFullscreenPepper* Create( | 34 static RenderWidgetFullscreenPepper* Create( |
33 int32_t routing_id, | 35 int32_t routing_id, |
34 int32_t opener_id, | 36 const RenderWidget::ShowCallback& show_callback, |
35 CompositorDependencies* compositor_deps, | 37 CompositorDependencies* compositor_deps, |
36 PepperPluginInstanceImpl* plugin, | 38 PepperPluginInstanceImpl* plugin, |
37 const GURL& active_url, | 39 const GURL& active_url, |
38 const ScreenInfo& screen_info); | 40 const ScreenInfo& screen_info); |
39 | 41 |
40 // pepper::FullscreenContainer API. | 42 // pepper::FullscreenContainer API. |
41 void Invalidate() override; | 43 void Invalidate() override; |
42 void InvalidateRect(const blink::WebRect& rect) override; | 44 void InvalidateRect(const blink::WebRect& rect) override; |
43 void ScrollRect(int dx, int dy, const blink::WebRect& rect) override; | 45 void ScrollRect(int dx, int dy, const blink::WebRect& rect) override; |
44 void Destroy() override; | 46 void Destroy() override; |
(...skipping 17 matching lines...) Expand all Loading... | |
62 PepperPluginInstanceImpl* plugin, | 64 PepperPluginInstanceImpl* plugin, |
63 const GURL& active_url, | 65 const GURL& active_url, |
64 const ScreenInfo& screen_info); | 66 const ScreenInfo& screen_info); |
65 ~RenderWidgetFullscreenPepper() override; | 67 ~RenderWidgetFullscreenPepper() override; |
66 | 68 |
67 // RenderWidget API. | 69 // RenderWidget API. |
68 void DidInitiatePaint() override; | 70 void DidInitiatePaint() override; |
69 void Close() override; | 71 void Close() override; |
70 void OnResize(const ResizeParams& params) override; | 72 void OnResize(const ResizeParams& params) override; |
71 | 73 |
72 // RenderWidgetFullscreen API. | |
73 blink::WebWidget* CreateWebWidget() override; | |
74 | |
75 // RenderWidget overrides. | 74 // RenderWidget overrides. |
76 GURL GetURLForGraphicsContext3D() override; | 75 GURL GetURLForGraphicsContext3D() override; |
77 void OnDeviceScaleFactorChanged() override; | 76 void OnDeviceScaleFactorChanged() override; |
78 | 77 |
79 private: | 78 private: |
80 // URL that is responsible for this widget, passed to ggl::CreateViewContext. | 79 // URL that is responsible for this widget, passed to ggl::CreateViewContext. |
81 GURL active_url_; | 80 GURL active_url_; |
82 | 81 |
83 // The plugin instance this widget wraps. | 82 // The plugin instance this widget wraps. |
84 PepperPluginInstanceImpl* plugin_; | 83 PepperPluginInstanceImpl* plugin_; |
85 | 84 |
86 blink::WebLayer* layer_; | 85 blink::WebLayer* layer_; |
87 | 86 |
88 std::unique_ptr<MouseLockDispatcher> mouse_lock_dispatcher_; | 87 std::unique_ptr<MouseLockDispatcher> mouse_lock_dispatcher_; |
89 | 88 |
90 DISALLOW_COPY_AND_ASSIGN(RenderWidgetFullscreenPepper); | 89 DISALLOW_COPY_AND_ASSIGN(RenderWidgetFullscreenPepper); |
91 }; | 90 }; |
92 | 91 |
93 } // namespace content | 92 } // namespace content |
94 | 93 |
95 #endif // CONTENT_RENDERER_RENDER_WIDGET_FULLSCREEN_PEPPER_H_ | 94 #endif // CONTENT_RENDERER_RENDER_WIDGET_FULLSCREEN_PEPPER_H_ |
OLD | NEW |