diff options
Diffstat (limited to 'chromium/content/renderer/browser_plugin/browser_plugin.h')
-rw-r--r-- | chromium/content/renderer/browser_plugin/browser_plugin.h | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/chromium/content/renderer/browser_plugin/browser_plugin.h b/chromium/content/renderer/browser_plugin/browser_plugin.h index 65dc203fc55..a123a1bf87f 100644 --- a/chromium/content/renderer/browser_plugin/browser_plugin.h +++ b/chromium/content/renderer/browser_plugin/browser_plugin.h @@ -5,7 +5,7 @@ #ifndef CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ #define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ -#include "third_party/WebKit/public/web/WebPlugin.h" +#include "third_party/blink/public/web/web_plugin.h" #include <memory> @@ -16,14 +16,15 @@ #include "components/viz/common/surfaces/frame_sink_id.h" #include "components/viz/common/surfaces/local_surface_id.h" #include "components/viz/common/surfaces/parent_local_surface_id_allocator.h" +#include "content/common/frame_resize_params.h" #include "content/public/common/screen_info.h" #include "content/renderer/child_frame_compositor.h" #include "content/renderer/mouse_lock_dispatcher.h" #include "content/renderer/render_view_impl.h" -#include "third_party/WebKit/public/web/WebDragStatus.h" -#include "third_party/WebKit/public/web/WebImeTextSpan.h" -#include "third_party/WebKit/public/web/WebInputMethodController.h" -#include "third_party/WebKit/public/web/WebNode.h" +#include "third_party/blink/public/web/web_drag_status.h" +#include "third_party/blink/public/web/web_ime_text_span.h" +#include "third_party/blink/public/web/web_input_method_controller.h" +#include "third_party/blink/public/web/web_node.h" #if defined(USE_AURA) #include "content/renderer/mus/mus_embedded_frame_delegate.h" @@ -163,8 +164,8 @@ class CONTENT_EXPORT BrowserPlugin : public blink::WebPlugin, ~BrowserPlugin() override; - const gfx::Rect& frame_rect() const { - return pending_resize_params_.frame_rect; + const gfx::Rect& screen_space_rect() const { + return pending_resize_params_.screen_space_rect; } gfx::Rect FrameRectInPixels() const; float GetDeviceScaleFactor() const; @@ -174,7 +175,7 @@ class CONTENT_EXPORT BrowserPlugin : public blink::WebPlugin, } uint64_t auto_size_sequence_number() const { - return pending_resize_params_.sequence_number; + return pending_resize_params_.auto_resize_sequence_number; } void UpdateInternalInstanceId(); @@ -193,6 +194,10 @@ class CONTENT_EXPORT BrowserPlugin : public blink::WebPlugin, void OnGuestReady(int instance_id, const viz::FrameSinkId& frame_sink_id); void OnResizeDueToAutoResize(int browser_plugin_instance_id, uint64_t sequence_number); + void OnEnableAutoResize(int browser_plugin_instance_id, + const gfx::Size& min_size, + const gfx::Size& max_size); + void OnDisableAutoResize(int browser_plugin_instance_id); void OnSetChildFrameSurface(int instance_id, const viz::SurfaceInfo& surface_info); void OnSetContentsOpaque(int instance_id, bool opaque); @@ -252,19 +257,12 @@ class CONTENT_EXPORT BrowserPlugin : public blink::WebPlugin, bool enable_surface_synchronization_ = false; - // TODO(fsamuel): We might want to unify this with content::ResizeParams. - struct ResizeParams { - gfx::Rect frame_rect; - ScreenInfo screen_info; - uint64_t sequence_number = 0lu; - }; - // The last ResizeParams sent to the browser process, if any. - base::Optional<ResizeParams> sent_resize_params_; + base::Optional<FrameResizeParams> sent_resize_params_; // The current set of ResizeParams. This may or may not match // |sent_resize_params_|. - ResizeParams pending_resize_params_; + FrameResizeParams pending_resize_params_; // We call lifetime managing methods on |delegate_|, but we do not directly // own this. The delegate destroys itself. |