OLD | NEW |
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 Loading... |
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 Loading... |
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 })(); |
OLD | NEW |