Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: chrome/browser/resources/file_manager/js/breadcrumbs_controller.js

Issue 12212187: [Cleanup] Files.app: Misc style fixes in Javascript code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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) 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 * @constructor
7 * @extends cr.EventTarget 6 * @extends cr.EventTarget
8 * @param {HTMLDivElement} div Div container for breadcrumbs. 7 * @param {HTMLDivElement} div Div container for breadcrumbs.
8 * @constructor
9 */ 9 */
10 function BreadcrumbsController(div) { 10 function BreadcrumbsController(div) {
11 this.bc_ = div; 11 this.bc_ = div;
12 this.hideLast_ = false; 12 this.hideLast_ = false;
13 this.rootPath_ = null; 13 this.rootPath_ = null;
14 this.path_ = null; 14 this.path_ = null;
15 div.addEventListener('click', this.onClick_.bind(this)); 15 div.addEventListener('click', this.onClick_.bind(this));
16 } 16 }
17 17
18 /** 18 /**
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 181
182 /** 182 /**
183 * Hide breadcrumbs div. 183 * Hide breadcrumbs div.
184 */ 184 */
185 BreadcrumbsController.prototype.hide = function() { 185 BreadcrumbsController.prototype.hide = function() {
186 this.bc_.style.display = 'none'; 186 this.bc_.style.display = 'none';
187 }; 187 };
188 188
189 /** 189 /**
190 * Handle a click event on a breadcrumb element. 190 * Handle a click event on a breadcrumb element.
191 * @param {Event} event The click event.
191 * @private 192 * @private
192 * @param {Event} event The click event.
193 */ 193 */
194 BreadcrumbsController.prototype.onClick_ = function(event) { 194 BreadcrumbsController.prototype.onClick_ = function(event) {
195 var path = this.getTargetPath(event); 195 var path = this.getTargetPath(event);
196 if (!path) 196 if (!path)
197 return; 197 return;
198 198
199 var newEvent = new cr.Event('pathclick'); 199 var newEvent = new cr.Event('pathclick');
200 newEvent.path = path; 200 newEvent.path = path;
201 this.dispatchEvent(newEvent); 201 this.dispatchEvent(newEvent);
202 }; 202 };
(...skipping 22 matching lines...) Expand all
225 }; 225 };
226 226
227 /** 227 /**
228 * Returns the breadcrumbs container. 228 * Returns the breadcrumbs container.
229 * @return {HTMLElement} Breadcumbs container HTML element. 229 * @return {HTMLElement} Breadcumbs container HTML element.
230 */ 230 */
231 BreadcrumbsController.prototype.getContainer = function() { 231 BreadcrumbsController.prototype.getContainer = function() {
232 return this.bc_; 232 return this.bc_;
233 }; 233 };
234 234
OLDNEW
« no previous file with comments | « chrome/browser/resources/file_manager/js/background.js ('k') | chrome/browser/resources/file_manager/js/butter_bar.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698