| OLD | NEW |
| 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 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // Take the input out of the tab-traversal focus order. | 48 // Take the input out of the tab-traversal focus order. |
| 49 this.input_.disabled = true; | 49 this.input_.disabled = true; |
| 50 this.appendChild(this.input_); | 50 this.appendChild(this.input_); |
| 51 | 51 |
| 52 this.displayTitle = title; | 52 this.displayTitle = title; |
| 53 this.titleIsEditable_ = titleIsEditable; | 53 this.titleIsEditable_ = titleIsEditable; |
| 54 | 54 |
| 55 this.addEventListener('keydown', this.onKeyDown_); | 55 this.addEventListener('keydown', this.onKeyDown_); |
| 56 this.addEventListener('click', this.onClick_); | 56 this.addEventListener('click', this.onClick_); |
| 57 this.addEventListener('dblclick', this.onDoubleClick_); | 57 this.addEventListener('dblclick', this.onDoubleClick_); |
| 58 this.dragWrapper_ = new DragWrapper(this, this); | 58 this.dragWrapper_ = new cr.ui.DragWrapper(this, this); |
| 59 this.addEventListener('webkitTransitionEnd', this.onTransitionEnd_); | 59 this.addEventListener('webkitTransitionEnd', this.onTransitionEnd_); |
| 60 | 60 |
| 61 this.input_.addEventListener('blur', this.onInputBlur_.bind(this)); | 61 this.input_.addEventListener('blur', this.onInputBlur_.bind(this)); |
| 62 this.input_.addEventListener('mousedown', | 62 this.input_.addEventListener('mousedown', |
| 63 this.onInputMouseDown_.bind(this)); | 63 this.onInputMouseDown_.bind(this)); |
| 64 this.input_.addEventListener('keydown', this.onInputKeyDown_.bind(this)); | 64 this.input_.addEventListener('keydown', this.onInputKeyDown_.bind(this)); |
| 65 | 65 |
| 66 if (animate) { | 66 if (animate) { |
| 67 this.classList.add('small'); | 67 this.classList.add('small'); |
| 68 var self = this; | 68 var self = this; |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 onTransitionEnd_: function(e) { | 263 onTransitionEnd_: function(e) { |
| 264 if (e.propertyName === 'max-width' && this.classList.contains('small')) | 264 if (e.propertyName === 'max-width' && this.classList.contains('small')) |
| 265 this.parentNode.removeChild(this); | 265 this.parentNode.removeChild(this); |
| 266 }, | 266 }, |
| 267 }; | 267 }; |
| 268 | 268 |
| 269 return { | 269 return { |
| 270 NavDot: NavDot, | 270 NavDot: NavDot, |
| 271 }; | 271 }; |
| 272 }); | 272 }); |
| OLD | NEW |