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

Unified Diff: chrome/browser/resources/login/display_manager.js

Issue 304153004: Center lock screen user pod when virtual keyboard is shown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add separate disable switch Created 6 years, 7 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: chrome/browser/resources/login/display_manager.js
diff --git a/chrome/browser/resources/login/display_manager.js b/chrome/browser/resources/login/display_manager.js
index b4c355c4a8be77e7e1f24e30ca9c262eae2c45ab..6c535e9a4517bdc289854a97583cf28d328f5d90 100644
--- a/chrome/browser/resources/login/display_manager.js
+++ b/chrome/browser/resources/login/display_manager.js
@@ -179,6 +179,18 @@ cr.define('cr.ui.login', function() {
virtualKeyboardShown_: false,
/**
+ * Virtual keyboard width.
+ * @type {number}
+ */
+ virtualKeyboardWidth_: 0,
+
+ /**
+ * Virtual keyboard height.
+ * @type {number}
+ */
+ virtualKeyboardHeight_: 0,
+
+ /**
* Type of UI.
* @type {string}
*/
@@ -244,6 +256,24 @@ cr.define('cr.ui.login', function() {
},
/**
+ * Sets the current size of the virtual keyboard.
+ * @param {number} width keyboard width
+ * @param {number} height keyboard height
+ */
+ setVirtualKeyboardSize: function(width, height) {
+ this.virtualKeyboardWidth_ = width;
+ this.virtualKeyboardHeight_ = height;
+
+ // Special case for screen lock. http://crbug.com/377904
+ // In case of virtual keyboard adjuct work area.
+ if (this.displayType == DISPLAY_TYPE.LOCK) {
+ var bottom = (height) ? height : $('login-header-bar').offsetHeight;
+ var clientArea = $('outer-container');
+ clientArea.style.bottom = bottom + 'px';
dzhioev (left Google) 2014/05/29 15:42:52 nit: toCssPx(bottom)
Nikita (slow) 2014/05/29 15:51:20 Done.
+ }
+ },
+
+ /**
* Sets the current size of the client area (display size).
* @param {number} width client area width
* @param {number} height client area height

Powered by Google App Engine
This is Rietveld 408576698