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

Side by Side Diff: chrome/browser/resources/bookmark_manager/js/main.js

Issue 2909503003: WebUI: Enable ESLint rule for missing semicolons. (Closed)
Patch Set: Undo local_ntp changes from this CL. Created 3 years, 7 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
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 (function() { 5 (function() {
6 'use strict'; 6 'use strict';
7 7
8 /** @const */ var BookmarkList = bmm.BookmarkList; 8 /** @const */ var BookmarkList = bmm.BookmarkList;
9 /** @const */ var BookmarkTree = bmm.BookmarkTree; 9 /** @const */ var BookmarkTree = bmm.BookmarkTree;
10 /** @const */ var Command = cr.ui.Command; 10 /** @const */ var Command = cr.ui.Command;
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after
876 return (opt_target || document.activeElement) == bmm.tree ? 876 return (opt_target || document.activeElement) == bmm.tree ?
877 bmm.tree.selectedFolders : bmm.list.selectedItems; 877 bmm.tree.selectedFolders : bmm.list.selectedItems;
878 } 878 }
879 879
880 /** 880 /**
881 * @param {EventTarget=} opt_target The target list or tree. 881 * @param {EventTarget=} opt_target The target list or tree.
882 * @return {!Array<string>} An array of the selected bookmark IDs. 882 * @return {!Array<string>} An array of the selected bookmark IDs.
883 */ 883 */
884 function getSelectedBookmarkIds(opt_target) { 884 function getSelectedBookmarkIds(opt_target) {
885 var selectedNodes = getSelectedBookmarkNodes(opt_target); 885 var selectedNodes = getSelectedBookmarkNodes(opt_target);
886 selectedNodes.sort(function(a, b) { return a.index - b.index }); 886 selectedNodes.sort(function(a, b) { return a.index - b.index; });
887 return selectedNodes.map(function(node) { 887 return selectedNodes.map(function(node) {
888 return node.id; 888 return node.id;
889 }); 889 });
890 } 890 }
891 891
892 /** 892 /**
893 * @param {BookmarkTreeNode} node The node to test. 893 * @param {BookmarkTreeNode} node The node to test.
894 * @return {boolean} Whether the given node is unmodifiable. 894 * @return {boolean} Whether the given node is unmodifiable.
895 */ 895 */
896 function isUnmodifiable(node) { 896 function isUnmodifiable(node) {
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
1533 1533
1534 cr.ui.FocusOutlineManager.forDocument(document); 1534 cr.ui.FocusOutlineManager.forDocument(document);
1535 initializeSplitter(); 1535 initializeSplitter();
1536 bmm.addBookmarkModelListeners(); 1536 bmm.addBookmarkModelListeners();
1537 dnd.init(selectItemsAfterUserAction); 1537 dnd.init(selectItemsAfterUserAction);
1538 bmm.tree.reload(); 1538 bmm.tree.reload();
1539 } 1539 }
1540 1540
1541 initializeBookmarkManager(); 1541 initializeBookmarkManager();
1542 })(); 1542 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698