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

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

Issue 608883002: Revert "Prevent updateOpenCommand() from receiving e.target of type other than BookmarkList|Bookmar… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /** @const */ var BookmarkList = bmm.BookmarkList; 6 /** @const */ var BookmarkList = bmm.BookmarkList;
7 /** @const */ var BookmarkTree = bmm.BookmarkTree; 7 /** @const */ var BookmarkTree = bmm.BookmarkTree;
8 /** @const */ var Command = cr.ui.Command; 8 /** @const */ var Command = cr.ui.Command;
9 /** @const */ var CommandBinding = cr.ui.CommandBinding; 9 /** @const */ var CommandBinding = cr.ui.CommandBinding;
10 /** @const */ var LinkKind = cr.LinkKind; 10 /** @const */ var LinkKind = cr.LinkKind;
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 !isUnmodifiable(tree.getBookmarkNodeById(list.parentId)); 452 !isUnmodifiable(tree.getBookmarkNodeById(list.parentId));
453 break; 453 break;
454 case 'undo-command': 454 case 'undo-command':
455 // If the search box is active, pass the undo command through 455 // If the search box is active, pass the undo command through
456 // (fixes http://crbug.com/278112). Otherwise, because 456 // (fixes http://crbug.com/278112). Otherwise, because
457 // the global undo command has no visible UI, always enable it, and 457 // the global undo command has no visible UI, always enable it, and
458 // just make it a no-op if undo is not possible. 458 // just make it a no-op if undo is not possible.
459 e.canExecute = e.currentTarget.activeElement !== $('term'); 459 e.canExecute = e.currentTarget.activeElement !== $('term');
460 break; 460 break;
461 default: 461 default:
462 handleCanExecuteForList(e); 462 canExecuteForList(e);
463 break; 463 break;
464 } 464 }
465 } 465 }
466 466
467 /** 467 /**
468 * Helper function for handling canExecute for the list and the tree. 468 * Helper function for handling canExecute for the list and the tree.
469 * @param {!Event} e Can execute event object. 469 * @param {!Event} e Can execute event object.
470 * @param {boolean} isSearch Whether the user is trying to do a command on 470 * @param {boolean} isSearch Whether the user is trying to do a command on
471 * search. 471 * search.
472 */ 472 */
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after
1369 1369
1370 cr.ui.FocusOutlineManager.forDocument(document); 1370 cr.ui.FocusOutlineManager.forDocument(document);
1371 initializeSplitter(); 1371 initializeSplitter();
1372 bmm.addBookmarkModelListeners(); 1372 bmm.addBookmarkModelListeners();
1373 dnd.init(selectItemsAfterUserAction); 1373 dnd.init(selectItemsAfterUserAction);
1374 tree.reload(); 1374 tree.reload();
1375 } 1375 }
1376 1376
1377 initializeBookmarkManager(); 1377 initializeBookmarkManager();
1378 })(); 1378 })();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698