Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: chrome/browser/resources/chromeos/login/bubble.js

Issue 7980012: [ChromeOS] Reland - Make WebUI login use only needed resources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview Bubble implementation. 6 * @fileoverview Bubble implementation.
7 */ 7 */
8 8
9 // TODO(xiyuan): Move this into shared. 9 // TODO(xiyuan): Move this into shared.
10 cr.define('cr.ui', function() { 10 cr.define('cr.ui', function() {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 /** 56 /**
57 * Shows the bubble for given anchor element. 57 * Shows the bubble for given anchor element.
58 * @param {!HTMLElement} el Anchor element of the bubble. 58 * @param {!HTMLElement} el Anchor element of the bubble.
59 * @param {HTMLElement} content Content to show in bubble. 59 * @param {HTMLElement} content Content to show in bubble.
60 * @public 60 * @public
61 */ 61 */
62 showContentForElement: function(el, content) { 62 showContentForElement: function(el, content) {
63 const HORIZONTAL_PADDING = 10; 63 const HORIZONTAL_PADDING = 10;
64 const VERTICAL_PADDING = 5; 64 const VERTICAL_PADDING = 5;
65 65
66 var elementOrigin = Oobe.getOffset(el); 66 var elementOrigin = cr.ui.login.DisplayManager.getOffset(el);
67 var anchorX = elementOrigin.left + HORIZONTAL_PADDING; 67 var anchorX = elementOrigin.left + HORIZONTAL_PADDING;
68 var anchorY = elementOrigin.top + el.offsetHeight + VERTICAL_PADDING; 68 var anchorY = elementOrigin.top + el.offsetHeight + VERTICAL_PADDING;
69 69
70 this.anchor_ = el; 70 this.anchor_ = el;
71 this.showContentAt(anchorX, anchorY, content); 71 this.showContentAt(anchorX, anchorY, content);
72 }, 72 },
73 73
74 /** 74 /**
75 * Shows the bubble for given anchor element. 75 * Shows the bubble for given anchor element.
76 * @param {!HTMLElement} el Anchor element of the bubble. 76 * @param {!HTMLElement} el Anchor element of the bubble.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 handleDocKeyDown_: function(e) { 120 handleDocKeyDown_: function(e) {
121 if (!this.hidden) 121 if (!this.hidden)
122 this.hide(); 122 this.hide();
123 } 123 }
124 }; 124 };
125 125
126 return { 126 return {
127 Bubble: Bubble 127 Bubble: Bubble
128 }; 128 };
129 }); 129 });
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/webui_login_view.cc ('k') | chrome/browser/resources/chromeos/login/display_manager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698