OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #import "chrome/browser/app_controller_mac.h" | 5 #import "chrome/browser/app_controller_mac.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/sys_string_conversions.h" | 9 #include "base/sys_string_conversions.h" |
10 #include "chrome/app/chrome_dll_resource.h" | 10 #include "chrome/app/chrome_dll_resource.h" |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 // because it's too early. Do it before we create any bookmark menus as well, | 219 // because it's too early. Do it before we create any bookmark menus as well, |
220 // just in case one has a title that matches any of our strings (unlikely, | 220 // just in case one has a title that matches any of our strings (unlikely, |
221 // but technically possible). | 221 // but technically possible). |
222 scoped_nsobject<MenuLocalizer> localizer( | 222 scoped_nsobject<MenuLocalizer> localizer( |
223 [[MenuLocalizer alloc] initWithBundle:nil]); | 223 [[MenuLocalizer alloc] initWithBundle:nil]); |
224 [localizer localizeObject:[NSApplication sharedApplication] | 224 [localizer localizeObject:[NSApplication sharedApplication] |
225 recursively:YES]; | 225 recursively:YES]; |
226 | 226 |
227 bookmarkMenuBridge_.reset(new BookmarkMenuBridge()); | 227 bookmarkMenuBridge_.reset(new BookmarkMenuBridge()); |
228 | 228 |
229 // Register any Mac-specific preferences. | |
230 PrefService* prefs = [self defaultProfile]->GetPrefs(); | |
231 prefs->RegisterBooleanPref(prefs::kShowPageOptionsButtons, false); | |
232 [self setUpdateCheckInterval]; | 229 [self setUpdateCheckInterval]; |
233 | 230 |
234 // Build up the encoding menu, the order of the items differs based on the | 231 // Build up the encoding menu, the order of the items differs based on the |
235 // current locale (see http://crbug.com/7647 for details). | 232 // current locale (see http://crbug.com/7647 for details). |
236 // We need a valid g_browser_process to get the profile which is why we can't | 233 // We need a valid g_browser_process to get the profile which is why we can't |
237 // call this from awakeFromNib. | 234 // call this from awakeFromNib. |
238 EncodingMenuControllerDelegate::BuildEncodingMenu([self defaultProfile]); | 235 EncodingMenuControllerDelegate::BuildEncodingMenu([self defaultProfile]); |
239 | 236 |
240 // Now that we're initialized we can open any URLs we've been holding onto. | 237 // Now that we're initialized we can open any URLs we've been holding onto. |
241 [self openPendingURLs]; | 238 [self openPendingURLs]; |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 name:kUserClosedAboutNotification | 524 name:kUserClosedAboutNotification |
528 object:aboutController_.get()]; | 525 object:aboutController_.get()]; |
529 } | 526 } |
530 if (![[aboutController_ window] isVisible]) | 527 if (![[aboutController_ window] isVisible]) |
531 [[aboutController_ window] center]; | 528 [[aboutController_ window] center]; |
532 [aboutController_ showWindow:self]; | 529 [aboutController_ showWindow:self]; |
533 #endif | 530 #endif |
534 } | 531 } |
535 | 532 |
536 @end | 533 @end |
OLD | NEW |