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

Side by Side Diff: chrome/browser/guest_view/extension_options/extension_options_guest.cc

Issue 444813002: Remove BrowserPlugin's -internal-attach method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated Created 6 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "chrome/browser/guest_view/extension_options/extension_options_guest.h" 5 #include "chrome/browser/guest_view/extension_options/extension_options_guest.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" 8 #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h"
9 #include "chrome/browser/guest_view/extension_options/extension_options_constant s.h" 9 #include "chrome/browser/guest_view/extension_options/extension_options_constant s.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 extension_options_internal::OnSizeChanged::kEventName, args.Pass())); 150 extension_options_internal::OnSizeChanged::kEventName, args.Pass()));
151 } 151 }
152 152
153 bool ExtensionOptionsGuest::IsAutoSizeSupported() const { 153 bool ExtensionOptionsGuest::IsAutoSizeSupported() const {
154 return true; 154 return true;
155 } 155 }
156 156
157 void ExtensionOptionsGuest::SetUpAutoSize() { 157 void ExtensionOptionsGuest::SetUpAutoSize() {
158 // Read the autosize parameters passed in from the embedder. 158 // Read the autosize parameters passed in from the embedder.
159 bool auto_size_enabled = false; 159 bool auto_size_enabled = false;
160 extra_params()->GetBoolean(extensionoptions::kAttributeAutoSize, 160 attach_params()->GetBoolean(extensionoptions::kAttributeAutoSize,
161 &auto_size_enabled); 161 &auto_size_enabled);
162 162
163 int max_height = 0; 163 int max_height = 0;
164 int max_width = 0; 164 int max_width = 0;
165 extra_params()->GetInteger(extensionoptions::kAttributeMaxHeight, 165 attach_params()->GetInteger(extensionoptions::kAttributeMaxHeight,
166 &max_height); 166 &max_height);
167 extra_params()->GetInteger(extensionoptions::kAttributeMaxWidth, &max_width); 167 attach_params()->GetInteger(extensionoptions::kAttributeMaxWidth, &max_width);
168 168
169 int min_height = 0; 169 int min_height = 0;
170 int min_width = 0; 170 int min_width = 0;
171 extra_params()->GetInteger(extensionoptions::kAttributeMinHeight, 171 attach_params()->GetInteger(extensionoptions::kAttributeMinHeight,
172 &min_height); 172 &min_height);
173 extra_params()->GetInteger(extensionoptions::kAttributeMinWidth, &min_width); 173 attach_params()->GetInteger(extensionoptions::kAttributeMinWidth, &min_width);
174 174
175 // Call SetAutoSize to apply all the appropriate validation and clipping of 175 // Call SetAutoSize to apply all the appropriate validation and clipping of
176 // values. 176 // values.
177 SetAutoSize( 177 SetAutoSize(
178 true, gfx::Size(min_width, min_height), gfx::Size(max_width, max_height)); 178 true, gfx::Size(min_width, min_height), gfx::Size(max_width, max_height));
179 } 179 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698