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

Side by Side Diff: chrome/browser/resources/md_bookmarks/item.js

Issue 2645273002: [MD Bookmarks] Modify search to retain the previously selected folder. (Closed)
Patch Set: Rebase and update test to use selectFolder. Created 3 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 Polymer({ 5 Polymer({
6 is: 'bookmarks-item', 6 is: 'bookmarks-item',
7 7
8 properties: { 8 properties: {
9 /** @type {BookmarkTreeNode} */ 9 /** @type {BookmarkTreeNode} */
10 item: { 10 item: {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 range: e.shiftKey, 56 range: e.shiftKey,
57 add: e.ctrlKey, 57 add: e.ctrlKey,
58 }); 58 });
59 }, 59 },
60 60
61 /** 61 /**
62 * @param {Event} e 62 * @param {Event} e
63 * @private 63 * @private
64 */ 64 */
65 onDblClick_: function(e) { 65 onDblClick_: function(e) {
66 if (!this.item.url) 66 if (!this.item.url) {
67 this.fire('selected-folder-changed', this.item.id); 67 this.fire('selected-folder-changed', {
68 else 68 id: this.item.id,
69 clearSearch: true,
70 });
71 } else {
69 chrome.tabs.create({url: this.item.url}); 72 chrome.tabs.create({url: this.item.url});
73 }
70 }, 74 },
71 75
72 /** 76 /**
73 * @param {string} url 77 * @param {string} url
74 * @private 78 * @private
75 */ 79 */
76 updateFavicon_: function(url) { 80 updateFavicon_: function(url) {
77 this.$.icon.style.backgroundImage = cr.icon.getFavicon(url); 81 this.$.icon.style.backgroundImage = cr.icon.getFavicon(url);
78 }, 82 },
79 }); 83 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_bookmarks/folder_node.js ('k') | chrome/browser/resources/md_bookmarks/router.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698