summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/history_menu_bridge.mm
diff options
context:
space:
mode:
authorrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-08 17:44:48 +0000
committerrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-08 17:44:48 +0000
commit5b7b393af2369c957efae1e9c196df89f6a28caa (patch)
treeb376deadc638d2751c8f199c30f3d48dd876f794 /chrome/browser/cocoa/history_menu_bridge.mm
parent7e91b11e31098a41582dad6bd279d3b7d0f3c089 (diff)
downloadchromium_src-5b7b393af2369c957efae1e9c196df89f6a28caa.zip
chromium_src-5b7b393af2369c957efae1e9c196df89f6a28caa.tar.gz
chromium_src-5b7b393af2369c957efae1e9c196df89f6a28caa.tar.bz2
[Mac] Minor adjustments to the history menu, per the UI team.
* Increase the number of Recently Closed items to 10. * Move the "Show Full History" item to be at the end of the menu (XIB change). BUG=37209 TEST=Open and navigate 12 tabs. Close 10 of them; History menu should be full. Close one more; history menu stays at 10. TEST="Show Full History" is the last item in the menu. Review URL: http://codereview.chromium.org/660438 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40905 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/history_menu_bridge.mm')
-rw-r--r--chrome/browser/cocoa/history_menu_bridge.mm17
1 files changed, 11 insertions, 6 deletions
diff --git a/chrome/browser/cocoa/history_menu_bridge.mm b/chrome/browser/cocoa/history_menu_bridge.mm
index b6f151c..d66dc37 100644
--- a/chrome/browser/cocoa/history_menu_bridge.mm
+++ b/chrome/browser/cocoa/history_menu_bridge.mm
@@ -20,26 +20,27 @@
#include "chrome/common/notification_service.h"
#include "chrome/common/url_constants.h"
#include "grit/app_resources.h"
+#include "grit/theme_resources.h"
#include "skia/ext/skia_utils_mac.h"
namespace {
// Menus more than this many chars long will get trimmed.
-const static NSUInteger kMaximumMenuWidthInChars = 65;
+const NSUInteger kMaximumMenuWidthInChars = 65;
// When trimming, use this many chars from each side.
-const static NSUInteger kMenuTrimSizeInChars = 30;
+const NSUInteger kMenuTrimSizeInChars = 30;
// Number of days to consider when getting the number of most visited items.
-const static int kMostVisitedScope = 90;
+const int kMostVisitedScope = 90;
// The number of most visisted results to get.
-const static int kMostVisitedCount = 9;
+const int kMostVisitedCount = 9;
// The number of recently closed items to get.
-const static unsigned int kRecentlyClosedCount = 5;
+const unsigned int kRecentlyClosedCount = 10;
-}
+} // namespace
HistoryMenuBridge::HistoryMenuBridge(Profile* profile)
: controller_([[HistoryMenuCocoaController alloc] initWithBridge:this]),
@@ -69,6 +70,10 @@ HistoryMenuBridge::HistoryMenuBridge(Profile* profile)
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
default_favicon_.reset([rb.GetNSImageNamed(IDR_DEFAULT_FAVICON) retain]);
+ // Set the static icons in the menu.
+ NSMenuItem* item = [HistoryMenu() itemWithTag:IDC_SHOW_HISTORY];
+ [item setImage:rb.GetNSImageNamed(IDR_HISTORY_FAVICON)];
+
// The service is not ready for use yet, so become notified when it does.
if (!history_service_) {
registrar_.Add(this,