| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // require: event_tracker.js | 5 // require: event_tracker.js |
| 6 | 6 |
| 7 cr.define('cr.ui', function() { | 7 cr.define('cr.ui', function() { |
| 8 'use strict'; | 8 'use strict'; |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 | 68 |
| 69 if (!this.hidden) | 69 if (!this.hidden) |
| 70 this.resizeAndReposition(); | 70 this.resizeAndReposition(); |
| 71 }, | 71 }, |
| 72 | 72 |
| 73 /** | 73 /** |
| 74 * Handles the close event which is triggered when the close button | 74 * Handles the close event which is triggered when the close button |
| 75 * is clicked. By default is set to this.hide. | 75 * is clicked. By default is set to this.hide. |
| 76 * @param {Function} func A function with no parameters. | 76 * @param {Function} func A function with no parameters. |
| 77 */ | 77 */ |
| 78 set handleCloseEvent(func) { this.handleCloseEvent_ = func; }, | 78 set handleCloseEvent(func) { |
| 79 this.handleCloseEvent_ = func; |
| 80 }, |
| 79 | 81 |
| 80 /** | 82 /** |
| 81 * Temporarily suppresses the bubble from view (and toggles it back). | 83 * Temporarily suppresses the bubble from view (and toggles it back). |
| 82 * 'Suppressed' and 'hidden' are two bubble states that both indicate that | 84 * 'Suppressed' and 'hidden' are two bubble states that both indicate that |
| 83 * the bubble should not be visible, but when you 'un-suppress' a bubble, | 85 * the bubble should not be visible, but when you 'un-suppress' a bubble, |
| 84 * only a suppressed bubble becomes visible. This can be handy, for example, | 86 * only a suppressed bubble becomes visible. This can be handy, for example, |
| 85 * if the user switches away from the app card (then we need to know which | 87 * if the user switches away from the app card (then we need to know which |
| 86 * bubbles to show (only the suppressed ones, not the hidden ones). Hiding | 88 * bubbles to show (only the suppressed ones, not the hidden ones). Hiding |
| 87 * and un-hiding a bubble overrides the suppressed state (a bubble cannot | 89 * and un-hiding a bubble overrides the suppressed state (a bubble cannot |
| 88 * be suppressed but not hidden). | 90 * be suppressed but not hidden). |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 /** | 295 /** |
| 294 * Whether the title needs to be masked out towards the right, which indicates | 296 * Whether the title needs to be masked out towards the right, which indicates |
| 295 * to the user that part of the text is clipped. This is only used when the | 297 * to the user that part of the text is clipped. This is only used when the |
| 296 * bubble is collapsed and the title doesn't fit because it is maxed out in | 298 * bubble is collapsed and the title doesn't fit because it is maxed out in |
| 297 * width within the anchored node. | 299 * width within the anchored node. |
| 298 */ | 300 */ |
| 299 cr.defineProperty(ExpandableBubble, 'masked', cr.PropertyKind.BOOL_ATTR); | 301 cr.defineProperty(ExpandableBubble, 'masked', cr.PropertyKind.BOOL_ATTR); |
| 300 | 302 |
| 301 return {ExpandableBubble: ExpandableBubble}; | 303 return {ExpandableBubble: ExpandableBubble}; |
| 302 }); | 304 }); |
| OLD | NEW |