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

Side by Side Diff: chrome/browser/resources/ntp/most_visited.js

Issue 6354016: Fix layout glitches in NTP. Also, lots of naming cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: blech Created 9 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/ntp/most_visited.css ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // Dependencies that we should remove/formalize: 5 // Dependencies that we should remove/formalize:
6 // util.js 6 // util.js
7 // 7 //
8 // afterTransition 8 // afterTransition
9 // chrome.send 9 // chrome.send
10 // hideNotification 10 // hideNotification
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 updateMenu_: function() { 613 updateMenu_: function() {
614 clearClosedMenu(this.menu); 614 clearClosedMenu(this.menu);
615 var data = this.data.slice(0, MAX_MINIVIEW_ITEMS); 615 var data = this.data.slice(0, MAX_MINIVIEW_ITEMS);
616 for (var i = 0, item; item = data[i]; i++) { 616 for (var i = 0, item; item = data[i]; i++) {
617 if (!item.filler) { 617 if (!item.filler) {
618 addClosedMenuEntry( 618 addClosedMenuEntry(
619 this.menu, item.url, item.title, 'chrome://favicon/' + item.url); 619 this.menu, item.url, item.title, 'chrome://favicon/' + item.url);
620 } 620 }
621 } 621 }
622 addClosedMenuFooter( 622 addClosedMenuFooter(
623 this.menu, 'most-visited', MINIMIZED_THUMB, Section.THUMB); 623 this.menu, 'most-visited', MENU_THUMB, Section.THUMB);
624 }, 624 },
625 625
626 handleClick_: function(e) { 626 handleClick_: function(e) {
627 var target = e.target; 627 var target = e.target;
628 if (target.classList.contains('pin')) { 628 if (target.classList.contains('pin')) {
629 this.togglePinned_(getItem(target)); 629 this.togglePinned_(getItem(target));
630 e.preventDefault(); 630 e.preventDefault();
631 } else if (target.classList.contains('remove')) { 631 } else if (target.classList.contains('remove')) {
632 this.blacklist(getItem(target)); 632 this.blacklist(getItem(target));
633 e.preventDefault(); 633 e.preventDefault();
(...skipping 14 matching lines...) Expand all
648 handleKeyDown_: function(e) { 648 handleKeyDown_: function(e) {
649 if (!IS_MAC && e.keyCode == 46 || // Del 649 if (!IS_MAC && e.keyCode == 46 || // Del
650 IS_MAC && e.metaKey && e.keyCode == 8) { // Cmd + Backspace 650 IS_MAC && e.metaKey && e.keyCode == 8) { // Cmd + Backspace
651 this.blacklist(e.target); 651 this.blacklist(e.target);
652 } 652 }
653 } 653 }
654 }; 654 };
655 655
656 return MostVisited; 656 return MostVisited;
657 })(); 657 })();
OLDNEW
« no previous file with comments | « chrome/browser/resources/ntp/most_visited.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698