Chromium Code Reviews| Index: extensions/renderer/resources/guest_view/web_view_attributes.js |
| diff --git a/extensions/renderer/resources/guest_view/web_view_attributes.js b/extensions/renderer/resources/guest_view/web_view_attributes.js |
| index f8077b9039dd5f0589a54eff697a6d734e47bf8d..9d954238ae1809b53bb4c52120cd72a58df112b8 100644 |
| --- a/extensions/renderer/resources/guest_view/web_view_attributes.js |
| +++ b/extensions/renderer/resources/guest_view/web_view_attributes.js |
| @@ -92,6 +92,24 @@ AllowTransparencyAttribute.prototype.handleMutation = function(oldValue, |
| this.getValue()); |
| }; |
| +// Attribute that specifies whether transparency is allowed in the webview. |
| +function AllowScalingAttribute(webViewImpl) { |
| + BooleanAttribute.call( |
| + this, WebViewConstants.ATTRIBUTE_ALLOWSCALING, webViewImpl); |
| +} |
| + |
| +AllowScalingAttribute.prototype.__proto__ = BooleanAttribute.prototype; |
| + |
| +AllowScalingAttribute.prototype.handleMutation = function(oldValue, |
| + newValue) { |
|
Fady Samuel
2015/02/12 21:27:09
nit: alignment.
wjmaclean
2015/02/12 21:41:25
Done.
|
| + if (!this.webViewImpl.guest.getId()) { |
| + return; |
| + } |
| + |
| + WebViewInternal.setAllowScaling(this.webViewImpl.guest.getId(), |
| + this.getValue()); |
| +}; |
| + |
| // Attribute used to define the demension limits of autosizing. |
| function AutosizeDimensionAttribute(name, webViewImpl) { |
| WebViewAttribute.call(this, name, webViewImpl); |
| @@ -264,6 +282,8 @@ WebViewImpl.prototype.setupWebViewAttributes = function() { |
| this.attributes[WebViewConstants.ATTRIBUTE_ALLOWTRANSPARENCY] = |
| new AllowTransparencyAttribute(this); |
| + this.attributes[WebViewConstants.ATTRIBUTE_ALLOWSCALING] = |
| + new AllowScalingAttribute(this); |
| this.attributes[WebViewConstants.ATTRIBUTE_AUTOSIZE] = |
| new AutosizeAttribute(this); |
| this.attributes[WebViewConstants.ATTRIBUTE_NAME] = |