diff options
author | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-14 17:50:53 +0000 |
---|---|---|
committer | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-14 17:50:53 +0000 |
commit | 2bcec61a43b8b7ed7b9b0e96b68f5ed42110081a (patch) | |
tree | 957d756c489075bd18a8e09e5ee38c8a8e769ab8 /chrome/browser/app_controller_mac.mm | |
parent | d0bc15b44084f5860456ef9beac1f64bcfaf0eaf (diff) | |
download | chromium_src-2bcec61a43b8b7ed7b9b0e96b68f5ed42110081a.zip chromium_src-2bcec61a43b8b7ed7b9b0e96b68f5ed42110081a.tar.gz chromium_src-2bcec61a43b8b7ed7b9b0e96b68f5ed42110081a.tar.bz2 |
Implement OS X Encoding Menu.
Also refactor Windows Encoding menu a bit to make the moving parts x-platform.
Add a unit test for the menu encoding logic.
In a followup CL I'll add some UI tests around this.
Review URL: http://codereview.chromium.org/113315
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16072 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/app_controller_mac.mm')
-rw-r--r-- | chrome/browser/app_controller_mac.mm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm index 2261342..7632024 100644 --- a/chrome/browser/app_controller_mac.mm +++ b/chrome/browser/app_controller_mac.mm @@ -13,6 +13,7 @@ #include "chrome/browser/browser_list.h" #include "chrome/browser/browser_shutdown.h" #import "chrome/browser/cocoa/bookmark_menu_bridge.h" +#import "chrome/browser/cocoa/encoding_menu_controller_delegate_mac.h" #import "chrome/browser/cocoa/preferences_window_controller.h" #include "chrome/browser/command_updater.h" #include "chrome/common/pref_names.h" @@ -66,6 +67,13 @@ // Register any Mac-specific preferences. PrefService* prefs = [self defaultProfile]->GetPrefs(); prefs->RegisterBooleanPref(prefs::kShowPageOptionsButtons, false); + + // Build up the encoding menu, the order of the items differs based on the + // current locale (see http://crbug.com/7647 for details). + // We need a valid g_browser_process to get the profile which is why we can't + // call this from awakeFromNib. + EncodingMenuControllerDelegate::BuildEncodingMenu([self defaultProfile]); + } - (void)dealloc { |