| OLD | NEW |
| 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/cocoa/preferences_window_controller.h" | 5 #import "chrome/browser/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" |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 [underTheHoodScroller_ contentSize].width) | 527 [underTheHoodScroller_ contentSize].width) |
| 528 << "The Under the Hood content should be narrower than the content " | 528 << "The Under the Hood content should be narrower than the content " |
| 529 "of the scroller it goes into"; | 529 "of the scroller it goes into"; |
| 530 | 530 |
| 531 #if !defined(GOOGLE_CHROME_BUILD) | 531 #if !defined(GOOGLE_CHROME_BUILD) |
| 532 // "Enable logging" (breakpad and stats) is only in Google Chrome builds, | 532 // "Enable logging" (breakpad and stats) is only in Google Chrome builds, |
| 533 // remove the checkbox and slide everything above it down. | 533 // remove the checkbox and slide everything above it down. |
| 534 RemoveViewFromView(underTheHoodContentView_, enableLoggingCheckbox_); | 534 RemoveViewFromView(underTheHoodContentView_, enableLoggingCheckbox_); |
| 535 #endif // !defined(GOOGLE_CHROME_BUILD) | 535 #endif // !defined(GOOGLE_CHROME_BUILD) |
| 536 | 536 |
| 537 // If BackgroundMode is not enabled, hide the related prefs UI. |
| 538 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
| 539 switches::kEnableBackgroundMode)) { |
| 540 RemoveViewFromView(underTheHoodContentView_, backgroundModeTitle_); |
| 541 RemoveViewFromView(underTheHoodContentView_, backgroundModeCheckbox_); |
| 542 RemoveViewFromView(underTheHoodContentView_, backgroundModeDescription_); |
| 543 RemoveViewFromView(underTheHoodContentView_, backgroundModeLearnMore_); |
| 544 } |
| 545 |
| 537 // There are four problem children within the groups: | 546 // There are four problem children within the groups: |
| 538 // Basics - Default Browser | 547 // Basics - Default Browser |
| 539 // Personal Stuff - Sync | 548 // Personal Stuff - Sync |
| 540 // Personal Stuff - Themes | 549 // Personal Stuff - Themes |
| 541 // Personal Stuff - Browser Data | 550 // Personal Stuff - Browser Data |
| 542 // These four have buttons that with some localizations are wider then the | 551 // These four have buttons that with some localizations are wider then the |
| 543 // view. So the four get manually laid out before doing the general work so | 552 // view. So the four get manually laid out before doing the general work so |
| 544 // the views/window can be made wide enough to fit them. The layout in the | 553 // the views/window can be made wide enough to fit them. The layout in the |
| 545 // general pass is a noop for these buttons (since they are already sized). | 554 // general pass is a noop for these buttons (since they are already sized). |
| 546 | 555 |
| (...skipping 1583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2130 case OPTIONS_PAGE_ADVANCED: | 2139 case OPTIONS_PAGE_ADVANCED: |
| 2131 return underTheHoodView_; | 2140 return underTheHoodView_; |
| 2132 case OPTIONS_PAGE_DEFAULT: | 2141 case OPTIONS_PAGE_DEFAULT: |
| 2133 case OPTIONS_PAGE_COUNT: | 2142 case OPTIONS_PAGE_COUNT: |
| 2134 LOG(DFATAL) << "Invalid page value " << page; | 2143 LOG(DFATAL) << "Invalid page value " << page; |
| 2135 } | 2144 } |
| 2136 return basicsView_; | 2145 return basicsView_; |
| 2137 } | 2146 } |
| 2138 | 2147 |
| 2139 @end | 2148 @end |
| OLD | NEW |