OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/options/preferences_window_controller.h" | 5 #import "chrome/browser/ui/cocoa/options/preferences_window_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ui/base/l10n/l10n_util.h" | 9 #include "ui/base/l10n/l10n_util.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
769 DCHECK(alertIcon); | 769 DCHECK(alertIcon); |
770 [managedPrefsBannerWarningImage_ setImage:alertIcon]; | 770 [managedPrefsBannerWarningImage_ setImage:alertIcon]; |
771 | 771 |
772 [self initBannerStateForPage:initialPage_]; | 772 [self initBannerStateForPage:initialPage_]; |
773 [self switchToPage:initialPage_ animate:NO]; | 773 [self switchToPage:initialPage_ animate:NO]; |
774 | 774 |
775 // Save/restore position based on prefs. | 775 // Save/restore position based on prefs. |
776 if (g_browser_process && g_browser_process->local_state()) { | 776 if (g_browser_process && g_browser_process->local_state()) { |
777 sizeSaver_.reset([[WindowSizeAutosaver alloc] | 777 sizeSaver_.reset([[WindowSizeAutosaver alloc] |
778 initWithWindow:[self window] | 778 initWithWindow:[self window] |
779 prefService:g_browser_process->local_state() | 779 prefService:profile_->GetPrefs() |
780 path:prefs::kPreferencesWindowPlacement]); | 780 path:prefs::kPreferencesWindowPlacement]); |
781 } | 781 } |
782 | 782 |
783 // Initialize the banner gradient and stroke color. | 783 // Initialize the banner gradient and stroke color. |
784 NSColor* bannerStartingColor = | 784 NSColor* bannerStartingColor = |
785 [NSColor colorWithCalibratedRed:kBannerGradientColorTop[0] | 785 [NSColor colorWithCalibratedRed:kBannerGradientColorTop[0] |
786 green:kBannerGradientColorTop[1] | 786 green:kBannerGradientColorTop[1] |
787 blue:kBannerGradientColorTop[2] | 787 blue:kBannerGradientColorTop[2] |
788 alpha:1.0]; | 788 alpha:1.0]; |
789 NSColor* bannerEndingColor = | 789 NSColor* bannerEndingColor = |
(...skipping 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2175 case OPTIONS_PAGE_ADVANCED: | 2175 case OPTIONS_PAGE_ADVANCED: |
2176 return underTheHoodView_; | 2176 return underTheHoodView_; |
2177 case OPTIONS_PAGE_DEFAULT: | 2177 case OPTIONS_PAGE_DEFAULT: |
2178 case OPTIONS_PAGE_COUNT: | 2178 case OPTIONS_PAGE_COUNT: |
2179 LOG(DFATAL) << "Invalid page value " << page; | 2179 LOG(DFATAL) << "Invalid page value " << page; |
2180 } | 2180 } |
2181 return basicsView_; | 2181 return basicsView_; |
2182 } | 2182 } |
2183 | 2183 |
2184 @end | 2184 @end |
OLD | NEW |