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

Side by Side Diff: chrome/browser/resources/bookmark_manager/js/bmm/bookmark_list.js

Issue 527923002: Do not paste clipboard contents when middle click on a bookmark in Bookmark Manager. (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 | « 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 // TODO(arv): Now that this is driven by a data model, implement a data model 5 // TODO(arv): Now that this is driven by a data model, implement a data model
6 // that handles the loading and the events from the bookmark backend. 6 // that handles the loading and the events from the bookmark backend.
7 7
8 cr.define('bmm', function() { 8 cr.define('bmm', function() {
9 var List = cr.ui.List; 9 var List = cr.ui.List;
10 var ListItem = cr.ui.ListItem; 10 var ListItem = cr.ui.ListItem;
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 this.removeEventListener('mouseup', this.handleMiddleMouseUp_); 226 this.removeEventListener('mouseup', this.handleMiddleMouseUp_);
227 if (e.button == 1) { 227 if (e.button == 1) {
228 var el = e.target; 228 var el = e.target;
229 while (el.parentNode != this) { 229 while (el.parentNode != this) {
230 el = el.parentNode; 230 el = el.parentNode;
231 } 231 }
232 var node = el.bookmarkNode; 232 var node = el.bookmarkNode;
233 if (node && !bmm.isFolder(node)) 233 if (node && !bmm.isFolder(node))
234 this.dispatchUrlClickedEvent_(node.url, e); 234 this.dispatchUrlClickedEvent_(node.url, e);
235 } 235 }
236 e.preventDefault();
236 }, 237 },
237 238
238 // Bookmark model update callbacks 239 // Bookmark model update callbacks
239 handleBookmarkChanged: function(id, changeInfo) { 240 handleBookmarkChanged: function(id, changeInfo) {
240 var dataModel = this.dataModel; 241 var dataModel = this.dataModel;
241 var index = dataModel.findIndexById(id); 242 var index = dataModel.findIndexById(id);
242 if (index != -1) { 243 if (index != -1) {
243 var bookmarkNode = this.dataModel.item(index); 244 var bookmarkNode = this.dataModel.item(index);
244 bookmarkNode.title = changeInfo.title; 245 bookmarkNode.title = changeInfo.title;
245 if ('url' in changeInfo) 246 if ('url' in changeInfo)
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 } 597 }
597 } 598 }
598 } 599 }
599 }; 600 };
600 601
601 return { 602 return {
602 BookmarkList: BookmarkList, 603 BookmarkList: BookmarkList,
603 list: list 604 list: list
604 }; 605 };
605 }); 606 });
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