diff options
author | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-23 22:28:23 +0000 |
---|---|---|
committer | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-23 22:28:23 +0000 |
commit | fc34932cf30bd2f0e4f70c24d82fc9c2af9dcd7e (patch) | |
tree | 40cbd59b40ecdcc8eff943540dbef27b72ead0c2 /chrome/browser/app_controller_mac.mm | |
parent | 24c38a10af63ed1e300ffe7546ef766cb7539fe3 (diff) | |
download | chromium_src-fc34932cf30bd2f0e4f70c24d82fc9c2af9dcd7e.zip chromium_src-fc34932cf30bd2f0e4f70c24d82fc9c2af9dcd7e.tar.gz chromium_src-fc34932cf30bd2f0e4f70c24d82fc9c2af9dcd7e.tar.bz2 |
Mac: Hook up the page menu's "Encoding" submenu.
Hook the NSMenu's delegate up to the ToolbarController in the nib and
generalize EncodingMenuControllerDelegate to work with a NSMenu
object instead of grabbing the app menu.
BUG=22639
TEST=ToolbarControllerTest.PopulateEncodingMenu
Review URL: http://codereview.chromium.org/225016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27008 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/app_controller_mac.mm')
-rw-r--r-- | chrome/browser/app_controller_mac.mm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm index d8885d0..f2d1b2a 100644 --- a/chrome/browser/app_controller_mac.mm +++ b/chrome/browser/app_controller_mac.mm @@ -338,7 +338,11 @@ // 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]); + NSMenu* view_menu = [[[NSApp mainMenu] itemWithTag:IDC_VIEW_MENU] submenu]; + NSMenuItem* encoding_menu_item = [view_menu itemWithTag:IDC_ENCODING_MENU]; + NSMenu *encoding_menu = [encoding_menu_item submenu]; + EncodingMenuControllerDelegate::BuildEncodingMenu([self defaultProfile], + encoding_menu); // Now that we're initialized we can open any URLs we've been holding onto. [self openPendingURLs]; |