| 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..23668bf4b8998671f034e1e0b54f4646ffb93144 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) {
|
| + 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] =
|
|
|