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

Side by Side Diff: chrome/renderer/resources/extensions/extension_options.js

Issue 496863004: Fix <extensionoptions> setAutoSize call (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 var DocumentNatives = requireNative('document_natives'); 5 var DocumentNatives = requireNative('document_natives');
6 var ExtensionOptionsEvents = 6 var ExtensionOptionsEvents =
7 require('extensionOptionsEvents').ExtensionOptionsEvents; 7 require('extensionOptionsEvents').ExtensionOptionsEvents;
8 var GuestViewInternal = 8 var GuestViewInternal =
9 require('binding').Binding.create('guestViewInternal').generate(); 9 require('binding').Binding.create('guestViewInternal').generate();
10 var IdGenerator = requireNative('id_generator'); 10 var IdGenerator = requireNative('id_generator');
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 this.browserPluginNode.style.height = newHeight + 'px'; 168 this.browserPluginNode.style.height = newHeight + 'px';
169 169
170 // Do not allow the options page's dimensions to shrink so that the options 170 // Do not allow the options page's dimensions to shrink so that the options
171 // page has a consistent UI. If the new size is larger than the minimum, 171 // page has a consistent UI. If the new size is larger than the minimum,
172 // make that the new minimum size. 172 // make that the new minimum size.
173 if (newWidth > this.minwidth) 173 if (newWidth > this.minwidth)
174 this.minwidth = newWidth; 174 this.minwidth = newWidth;
175 if (newHeight > this.minheight) 175 if (newHeight > this.minheight)
176 this.minheight = newHeight; 176 this.minheight = newHeight;
177 177
178 GuestViewInternal.setAutoSize(this.instanceId, { 178 GuestViewInternal.setAutoSize(this.guestInstanceId, {
179 'enableAutoSize': this.extensionoptionsNode.hasAttribute('autosize'), 179 'enableAutoSize': this.extensionoptionsNode.hasAttribute('autosize'),
180 'min': { 180 'min': {
181 'width': parseInt(this.minwidth || 0), 181 'width': parseInt(this.minwidth || 0),
182 'height': parseInt(this.minheight || 0) 182 'height': parseInt(this.minheight || 0)
183 }, 183 },
184 'max': { 184 'max': {
185 'width': parseInt(this.maxwidth || 0), 185 'width': parseInt(this.maxwidth || 0),
186 'height': parseInt(this.maxheight || 0) 186 'height': parseInt(this.maxheight || 0)
187 } 187 }
188 }); 188 });
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 349
350 var useCapture = true; 350 var useCapture = true;
351 window.addEventListener('readystatechange', function listener(event) { 351 window.addEventListener('readystatechange', function listener(event) {
352 if (document.readyState == 'loading') 352 if (document.readyState == 'loading')
353 return; 353 return;
354 354
355 registerBrowserPluginElement(); 355 registerBrowserPluginElement();
356 registerExtensionOptionsElement(); 356 registerExtensionOptionsElement();
357 window.removeEventListener(event.type, listener, useCapture); 357 window.removeEventListener(event.type, listener, useCapture);
358 }, useCapture); 358 }, useCapture);
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698