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

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

Issue 515853002: "ctrl + double click" acts on the highlighted/selected bookmark list items irrespective of on which… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « AUTHORS ('k') | 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 // We need to verify that this is a correct ID. 232 // We need to verify that this is a correct ID.
233 chrome.bookmarks.get(id, function(items) { 233 chrome.bookmarks.get(id, function(items) {
234 if (items && items.length == 1) 234 if (items && items.length == 1)
235 updateParentId(id); 235 updateParentId(id);
236 }); 236 });
237 } 237 }
238 } 238 }
239 239
240 // Activate is handled by the open-in-same-window-command. 240 // Activate is handled by the open-in-same-window-command.
241 function handleDoubleClickForList(e) { 241 function handleDoubleClickForList(e) {
242 var target = e.target;
243 target = list.getListItemAncestor(target);
244 var index = -1;
yosin_UTC9 2014/09/01 01:04:54 nit: "?" makes shorter: var index = target ? list.
245 if (target)
246 index = list.getIndexOfListItem(target);
247
248 var sm = list.selectionModel;
249 var indexSelected = sm.getIndexSelected(index);
250 if (!indexSelected)
251 list.handlePointerDownUp_(e);
252
242 if (e.button == 0) 253 if (e.button == 0)
243 $('open-in-same-window-command').execute(); 254 $('open-in-same-window-command').execute();
244 } 255 }
245 256
246 // The list dispatches an event when the user clicks on the URL or the Show in 257 // The list dispatches an event when the user clicks on the URL or the Show in
247 // folder part. 258 // folder part.
248 function handleUrlClickedForList(e) { 259 function handleUrlClickedForList(e) {
249 getLinkController().openUrlFromEvent(e.url, e.originalEvent); 260 getLinkController().openUrlFromEvent(e.url, e.originalEvent);
250 chrome.bookmarkManagerPrivate.recordLaunch(); 261 chrome.bookmarkManagerPrivate.recordLaunch();
251 } 262 }
(...skipping 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after
1369 1380
1370 cr.ui.FocusOutlineManager.forDocument(document); 1381 cr.ui.FocusOutlineManager.forDocument(document);
1371 initializeSplitter(); 1382 initializeSplitter();
1372 bmm.addBookmarkModelListeners(); 1383 bmm.addBookmarkModelListeners();
1373 dnd.init(selectItemsAfterUserAction); 1384 dnd.init(selectItemsAfterUserAction);
1374 tree.reload(); 1385 tree.reload();
1375 } 1386 }
1376 1387
1377 initializeBookmarkManager(); 1388 initializeBookmarkManager();
1378 })(); 1389 })();
OLDNEW
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698