Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(587)

Side by Side Diff: chrome/browser/ui/cocoa/preferences_window_controller.mm

Issue 6046009: Move base/mac_util.h to base/mac and use the base::mac namespace.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #import "chrome/browser/ui/cocoa/preferences_window_controller.h" 5 #import "chrome/browser/ui/cocoa/preferences_window_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/l10n_util_mac.h" 10 #include "app/l10n_util_mac.h"
11 #include "app/resource_bundle.h" 11 #include "app/resource_bundle.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/mac_util.h" 13 #include "base/mac/mac_util.h"
14 #include "base/mac/scoped_aedesc.h" 14 #include "base/mac/scoped_aedesc.h"
15 #include "base/string16.h" 15 #include "base/string16.h"
16 #include "base/string_util.h" 16 #include "base/string_util.h"
17 #include "base/sys_string_conversions.h" 17 #include "base/sys_string_conversions.h"
18 #include "chrome/browser/autofill/autofill_dialog.h" 18 #include "chrome/browser/autofill/autofill_dialog.h"
19 #include "chrome/browser/autofill/autofill_type.h" 19 #include "chrome/browser/autofill/autofill_type.h"
20 #include "chrome/browser/autofill/personal_data_manager.h" 20 #include "chrome/browser/autofill/personal_data_manager.h"
21 #include "chrome/browser/browser_process.h" 21 #include "chrome/browser/browser_process.h"
22 #include "chrome/browser/download/download_manager.h" 22 #include "chrome/browser/download/download_manager.h"
23 #include "chrome/browser/download/download_prefs.h" 23 #include "chrome/browser/download/download_prefs.h"
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 @synthesize useSuggestEnabled = useSuggestEnabled_; 482 @synthesize useSuggestEnabled = useSuggestEnabled_;
483 @synthesize dnsPrefetchEnabled = dnsPrefetchEnabled_; 483 @synthesize dnsPrefetchEnabled = dnsPrefetchEnabled_;
484 @synthesize safeBrowsingEnabled = safeBrowsingEnabled_; 484 @synthesize safeBrowsingEnabled = safeBrowsingEnabled_;
485 @synthesize metricsReportingEnabled = metricsReportingEnabled_; 485 @synthesize metricsReportingEnabled = metricsReportingEnabled_;
486 @synthesize proxiesConfigureButtonEnabled = proxiesConfigureButtonEnabled_; 486 @synthesize proxiesConfigureButtonEnabled = proxiesConfigureButtonEnabled_;
487 487
488 - (id)initWithProfile:(Profile*)profile initialPage:(OptionsPage)initialPage { 488 - (id)initWithProfile:(Profile*)profile initialPage:(OptionsPage)initialPage {
489 DCHECK(profile); 489 DCHECK(profile);
490 // Use initWithWindowNibPath:: instead of initWithWindowNibName: so we 490 // Use initWithWindowNibPath:: instead of initWithWindowNibName: so we
491 // can override it in a unit test. 491 // can override it in a unit test.
492 NSString* nibPath = [mac_util::MainAppBundle() 492 NSString* nibPath = [base::mac::MainAppBundle()
493 pathForResource:@"Preferences" 493 pathForResource:@"Preferences"
494 ofType:@"nib"]; 494 ofType:@"nib"];
495 if ((self = [super initWithWindowNibPath:nibPath owner:self])) { 495 if ((self = [super initWithWindowNibPath:nibPath owner:self])) {
496 profile_ = profile->GetOriginalProfile(); 496 profile_ = profile->GetOriginalProfile();
497 initialPage_ = initialPage; 497 initialPage_ = initialPage;
498 prefs_ = profile->GetPrefs(); 498 prefs_ = profile->GetPrefs();
499 DCHECK(prefs_); 499 DCHECK(prefs_);
500 observer_.reset( 500 observer_.reset(
501 new PreferencesWindowControllerInternal::PrefObserverBridge(self)); 501 new PreferencesWindowControllerInternal::PrefObserverBridge(self));
502 502
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 668
669 // Now that we have the width needed for Basics and Personal Stuff, lay out 669 // Now that we have the width needed for Basics and Personal Stuff, lay out
670 // those pages bottom up making sure the strings fit and moving things up as 670 // those pages bottom up making sure the strings fit and moving things up as
671 // needed. 671 // needed.
672 672
673 CGFloat newWidth = NSWidth([basicsView_ frame]); 673 CGFloat newWidth = NSWidth([basicsView_ frame]);
674 CGFloat verticalShift = 0.0; 674 CGFloat verticalShift = 0.0;
675 verticalShift += AutoSizeGroup(basicsGroupDefaultBrowser_, 675 verticalShift += AutoSizeGroup(basicsGroupDefaultBrowser_,
676 kAutoSizeGroupBehaviorVerticalFirstToFit, 676 kAutoSizeGroupBehaviorVerticalFirstToFit,
677 verticalShift); 677 verticalShift);
678 verticalShift += AutoSizeGroup(basicsGroupSearchEngine_, 678 verticalShift += AutoSizeGroup(
679 kAutoSizeGroupBehaviorFirstTwoAsRowVerticalToFi t, 679 basicsGroupSearchEngine_,
680 verticalShift); 680 kAutoSizeGroupBehaviorFirstTwoAsRowVerticalToFit,
681 verticalShift);
681 verticalShift += AutoSizeGroup(basicsGroupToolbar_, 682 verticalShift += AutoSizeGroup(basicsGroupToolbar_,
682 kAutoSizeGroupBehaviorVerticalToFit, 683 kAutoSizeGroupBehaviorVerticalToFit,
683 verticalShift); 684 verticalShift);
684 verticalShift += AutoSizeGroup(basicsGroupHomePage_, 685 verticalShift += AutoSizeGroup(basicsGroupHomePage_,
685 kAutoSizeGroupBehaviorVerticalToFit, 686 kAutoSizeGroupBehaviorVerticalToFit,
686 verticalShift); 687 verticalShift);
687 verticalShift += AutoSizeGroup(basicsGroupStartup_, 688 verticalShift += AutoSizeGroup(basicsGroupStartup_,
688 kAutoSizeGroupBehaviorVerticalFirstToFit, 689 kAutoSizeGroupBehaviorVerticalFirstToFit,
689 verticalShift); 690 verticalShift);
690 [GTMUILocalizerAndLayoutTweaker 691 [GTMUILocalizerAndLayoutTweaker
(...skipping 1471 matching lines...) Expand 10 before | Expand all | Expand 10 after
2162 case OPTIONS_PAGE_ADVANCED: 2163 case OPTIONS_PAGE_ADVANCED:
2163 return underTheHoodView_; 2164 return underTheHoodView_;
2164 case OPTIONS_PAGE_DEFAULT: 2165 case OPTIONS_PAGE_DEFAULT:
2165 case OPTIONS_PAGE_COUNT: 2166 case OPTIONS_PAGE_COUNT:
2166 LOG(DFATAL) << "Invalid page value " << page; 2167 LOG(DFATAL) << "Invalid page value " << page;
2167 } 2168 }
2168 return basicsView_; 2169 return basicsView_;
2169 } 2170 }
2170 2171
2171 @end 2172 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/nsimage_cache_unittest.mm ('k') | chrome/browser/ui/cocoa/previewable_contents_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698