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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 * Clicking causes the associated page to show. | 89 * Clicking causes the associated page to show. |
90 * @param {Event} e The click event. | 90 * @param {Event} e The click event. |
91 * @private | 91 * @private |
92 */ | 92 */ |
93 onClick_: function(e) { | 93 onClick_: function(e) { |
94 this.switchToPage(); | 94 this.switchToPage(); |
95 // The explicit focus call is necessary because of overriding the default | 95 // The explicit focus call is necessary because of overriding the default |
96 // handling in onInputMouseDown_. | 96 // handling in onInputMouseDown_. |
97 if (this.ownerDocument.activeElement != this.input_) | 97 if (this.ownerDocument.activeElement != this.input_) |
98 this.focus(); | 98 this.focus(); |
| 99 |
| 100 chrome.send('navigationDotUsed'); |
99 e.stopPropagation(); | 101 e.stopPropagation(); |
100 }, | 102 }, |
101 | 103 |
102 /** | 104 /** |
103 * Double clicks allow the user to edit the page title. | 105 * Double clicks allow the user to edit the page title. |
104 * @param {Event} e The click event. | 106 * @param {Event} e The click event. |
105 * @private | 107 * @private |
106 */ | 108 */ |
107 onDoubleClick_: function(e) { | 109 onDoubleClick_: function(e) { |
108 if (this.titleIsEditable_) { | 110 if (this.titleIsEditable_) { |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 onTransitionEnd_: function(e) { | 233 onTransitionEnd_: function(e) { |
232 if (e.propertyName === 'max-width' && this.classList.contains('small')) | 234 if (e.propertyName === 'max-width' && this.classList.contains('small')) |
233 this.parentNode.removeChild(this); | 235 this.parentNode.removeChild(this); |
234 }, | 236 }, |
235 }; | 237 }; |
236 | 238 |
237 return { | 239 return { |
238 NavDot: NavDot, | 240 NavDot: NavDot, |
239 }; | 241 }; |
240 }); | 242 }); |
OLD | NEW |