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

Unified Diff: extensions/renderer/resources/guest_view/web_view_attributes.js

Issue 916363003: Enable pinch-zoom on the new login page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase for enum conflict. Created 5 years, 10 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
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] =
« no previous file with comments | « extensions/common/api/web_view_internal.json ('k') | extensions/renderer/resources/guest_view/web_view_constants.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698