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

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

Issue 1033373003: GuestView: Lazily push attributes to the browser process on attach (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_sizing
Patch Set: Removed more unnecessary changes Created 5 years, 9 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
« no previous file with comments | « no previous file | extensions/renderer/resources/guest_view/guest_view_attributes.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/guest_view/guest_view_base.cc
diff --git a/extensions/browser/guest_view/guest_view_base.cc b/extensions/browser/guest_view/guest_view_base.cc
index cf518e4f73374932f55be3529b2dd4e671f29899..c19a941f9d949a434aadccc24e64a96ec5d87d04 100644
--- a/extensions/browser/guest_view/guest_view_base.cc
+++ b/extensions/browser/guest_view/guest_view_base.cc
@@ -785,21 +785,21 @@ double GuestViewBase::GetEmbedderZoomFactor() {
void GuestViewBase::SetUpSizing(const base::DictionaryValue& params) {
// Read the autosize parameters passed in from the embedder.
- bool auto_size_enabled = false;
+ bool auto_size_enabled = auto_size_enabled_;
params.GetBoolean(guestview::kAttributeAutoSize, &auto_size_enabled);
- int max_height = 0;
- int max_width = 0;
+ int max_height = max_auto_size_.height();
+ int max_width = max_auto_size_.width();
params.GetInteger(guestview::kAttributeMaxHeight, &max_height);
params.GetInteger(guestview::kAttributeMaxWidth, &max_width);
- int min_height = 0;
- int min_width = 0;
+ int min_height = min_auto_size_.height();
+ int min_width = min_auto_size_.width();
params.GetInteger(guestview::kAttributeMinHeight, &min_height);
params.GetInteger(guestview::kAttributeMinWidth, &min_width);
- int normal_height = 0;
- int normal_width = 0;
+ int normal_height = normal_size_.height();
+ int normal_width = normal_size_.width();
if (is_full_page_plugin()) {
// The initial size of a full page plugin should be set to fill the
// owner's visible viewport.
« no previous file with comments | « no previous file | extensions/renderer/resources/guest_view/guest_view_attributes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698