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 /** | 5 /** |
6 * @fileoverview Nav dot | 6 * @fileoverview Nav dot |
7 * This is the class for the navigation controls that appear along the bottom | 7 * This is the class for the navigation controls that appear along the bottom |
8 * of the NTP. | 8 * of the NTP. |
9 */ | 9 */ |
10 | 10 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 this.input_.disabled = true; | 50 this.input_.disabled = true; |
51 this.appendChild(this.input_); | 51 this.appendChild(this.input_); |
52 | 52 |
53 this.displayTitle = title; | 53 this.displayTitle = title; |
54 this.titleIsEditable_ = titleIsEditable; | 54 this.titleIsEditable_ = titleIsEditable; |
55 | 55 |
56 this.addEventListener('keydown', this.onKeyDown_); | 56 this.addEventListener('keydown', this.onKeyDown_); |
57 this.addEventListener('click', this.onClick_); | 57 this.addEventListener('click', this.onClick_); |
58 this.addEventListener('dblclick', this.onDoubleClick_); | 58 this.addEventListener('dblclick', this.onDoubleClick_); |
59 this.dragWrapper_ = new cr.ui.DragWrapper(this, this); | 59 this.dragWrapper_ = new cr.ui.DragWrapper(this, this); |
60 this.addEventListener('webkitTransitionEnd', this.onTransitionEnd_); | 60 this.addEventListener('transitionend', this.onTransitionEnd_); |
61 | 61 |
62 this.input_.addEventListener('blur', this.onInputBlur_.bind(this)); | 62 this.input_.addEventListener('blur', this.onInputBlur_.bind(this)); |
63 this.input_.addEventListener('mousedown', | 63 this.input_.addEventListener('mousedown', |
64 this.onInputMouseDown_.bind(this)); | 64 this.onInputMouseDown_.bind(this)); |
65 this.input_.addEventListener('keydown', this.onInputKeyDown_.bind(this)); | 65 this.input_.addEventListener('keydown', this.onInputKeyDown_.bind(this)); |
66 | 66 |
67 if (animate) { | 67 if (animate) { |
68 this.classList.add('small'); | 68 this.classList.add('small'); |
69 var self = this; | 69 var self = this; |
70 window.setTimeout(function() { | 70 window.setTimeout(function() { |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 onTransitionEnd_: function(e) { | 248 onTransitionEnd_: function(e) { |
249 if (e.propertyName === 'max-width' && this.classList.contains('small')) | 249 if (e.propertyName === 'max-width' && this.classList.contains('small')) |
250 this.parentNode.removeChild(this); | 250 this.parentNode.removeChild(this); |
251 }, | 251 }, |
252 }; | 252 }; |
253 | 253 |
254 return { | 254 return { |
255 NavDot: NavDot, | 255 NavDot: NavDot, |
256 }; | 256 }; |
257 }); | 257 }); |
OLD | NEW |