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

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: 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..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] =

Powered by Google App Engine
This is Rietveld 408576698