Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(478)

Unified Diff: extensions/browser/guest_view/guest_view_base.h

Issue 800543005: Revert of Implemented explicit resizing from guestview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: extensions/browser/guest_view/guest_view_base.h
diff --git a/extensions/browser/guest_view/guest_view_base.h b/extensions/browser/guest_view/guest_view_base.h
index 2a67a99118f57b517958cc6186bc3d69adf9affa..42eb3bfe782bfec5b368a56b229931dcff3842e3 100644
--- a/extensions/browser/guest_view/guest_view_base.h
+++ b/extensions/browser/guest_view/guest_view_base.h
@@ -21,22 +21,6 @@
struct RendererContentSettingRules;
namespace extensions {
-
-// A struct of parameters for SetSize(). The parameters are all declared as
-// scoped pointers since they are all optional. Null pointers indicate that the
-// parameter has not been provided, and the last used value should be used. Note
-// that when |enable_auto_size| is true, providing |normal_size| is not
-// meaningful. This is because the normal size of the guestview is overridden
-// whenever autosizing occurs.
-struct SetSizeParams {
- SetSizeParams();
- ~SetSizeParams();
-
- scoped_ptr<bool> enable_auto_size;
- scoped_ptr<gfx::Size> min_size;
- scoped_ptr<gfx::Size> max_size;
- scoped_ptr<gfx::Size> normal_size;
-};
// A GuestViewBase is the base class browser-side API implementation for a
// <*view> tag. GuestViewBase maintains an association between a guest
@@ -206,9 +190,10 @@
return !strcmp(GetViewType(), view_type);
}
- // Used to toggle autosize mode for this GuestView, and set both the automatic
- // and normal sizes.
- void SetSize(const SetSizeParams& params);
+ // Toggles autosize mode for this GuestView.
+ void SetAutoSize(bool enabled,
+ const gfx::Size& min_size,
+ const gfx::Size& max_size);
bool initialized() const { return initialized_; }
@@ -306,7 +291,7 @@
const WebContentsCreatedCallback& callback,
content::WebContents* guest_web_contents);
- void SetUpSizing(const base::DictionaryValue& params);
+ void SetUpAutoSize(const base::DictionaryValue& params);
void StartTrackingEmbedderZoomLevel();
void StopTrackingEmbedderZoomLevel();
@@ -378,6 +363,9 @@
// away then this guest also self-destructs.
scoped_ptr<OpenerLifetimeObserver> opener_lifetime_observer_;
+ // The size of the container element.
+ gfx::Size element_size_;
+
// The size of the guest content. Note: In autosize mode, the container
// element may not match the size of the guest.
gfx::Size guest_size_;
@@ -394,9 +382,6 @@
// The minimum size constraints of the container element in autosize mode.
gfx::Size min_auto_size_;
- // The size that will be used when autosize mode is disabled.
- gfx::Size normal_size_;
-
// Whether the guest view is inside a plugin document.
bool is_full_page_plugin_;
« no previous file with comments | « extensions/browser/api/guest_view/guest_view_internal_api.cc ('k') | extensions/browser/guest_view/guest_view_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698