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

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

Issue 1058533006: Bookmarked URL gets open in New tab, on pressing enter key for 'Folders' dropdown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes as per review comments. Created 5 years, 8 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 LinkKind = cr.LinkKind; 9 /** @const */ var LinkKind = cr.LinkKind;
10 /** @const */ var ListItem = cr.ui.ListItem; 10 /** @const */ var ListItem = cr.ui.ListItem;
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 case 'cut-command': 628 case 'cut-command':
629 e.canExecute = canCopyItems() && canEdit && 629 e.canExecute = canCopyItems() && canEdit &&
630 !hasUnmodifiable(bmm.list.selectedItems); 630 !hasUnmodifiable(bmm.list.selectedItems);
631 break; 631 break;
632 632
633 case 'copy-command': 633 case 'copy-command':
634 e.canExecute = canCopyItems(); 634 e.canExecute = canCopyItems();
635 break; 635 break;
636 636
637 case 'open-in-same-window-command': 637 case 'open-in-same-window-command':
638 e.canExecute = hasSelected(); 638 e.canExecute = (e.target == bmm.list) && hasSelected();
639 break; 639 break;
640 640
641 default: 641 default:
642 canExecuteShared(e, isSearch()); 642 canExecuteShared(e, isSearch());
643 } 643 }
644 } 644 }
645 645
646 // Update canExecute for the commands when the list is the active element. 646 // Update canExecute for the commands when the list is the active element.
647 function handleCanExecuteForList(e) { 647 function handleCanExecuteForList(e) {
648 if (e.target != bmm.list) return; 648 if (e.target != bmm.list) return;
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
1517 1517
1518 cr.ui.FocusOutlineManager.forDocument(document); 1518 cr.ui.FocusOutlineManager.forDocument(document);
1519 initializeSplitter(); 1519 initializeSplitter();
1520 bmm.addBookmarkModelListeners(); 1520 bmm.addBookmarkModelListeners();
1521 dnd.init(selectItemsAfterUserAction); 1521 dnd.init(selectItemsAfterUserAction);
1522 bmm.tree.reload(); 1522 bmm.tree.reload();
1523 } 1523 }
1524 1524
1525 initializeBookmarkManager(); 1525 initializeBookmarkManager();
1526 })(); 1526 })();
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