| 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 #include "chrome/browser/ui/views/options/advanced_page_view.h" | 5 #include "chrome/browser/ui/views/options/advanced_page_view.h" |
| 6 | 6 |
| 7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/ui/options/options_util.h" | 10 #include "chrome/browser/ui/options/options_util.h" |
| 11 #include "chrome/browser/ui/views/options/advanced_contents_view.h" | 11 #include "chrome/browser/ui/views/options/advanced_contents_view.h" |
| 12 #include "chrome/browser/ui/views/options/managed_prefs_banner_view.h" | 12 #include "chrome/browser/ui/views/options/managed_prefs_banner_view.h" |
| 13 #include "chrome/common/chrome_constants.h" | 13 #include "chrome/common/chrome_constants.h" |
| 14 #include "grit/chromium_strings.h" | 14 #include "grit/chromium_strings.h" |
| 15 #include "grit/generated_resources.h" | 15 #include "grit/generated_resources.h" |
| 16 #include "grit/locale_settings.h" | 16 #include "grit/locale_settings.h" |
| 17 #include "ui/base/l10n/l10n_util.h" | 17 #include "ui/base/l10n/l10n_util.h" |
| 18 #include "ui/base/message_box_flags.h" | 18 #include "ui/base/message_box_flags.h" |
| 19 #include "views/controls/message_box_view.h" | 19 #include "views/controls/message_box_view.h" |
| 20 #include "views/controls/button/native_button.h" | 20 #include "views/controls/button/native_button.h" |
| 21 #include "views/controls/scroll_view.h" | 21 #include "views/controls/scroll_view.h" |
| 22 #include "views/grid_layout.h" | 22 #include "views/grid_layout.h" |
| 23 #include "views/standard_layout.h" | 23 #include "views/layout/layout_constants.h" |
| 24 #include "views/window/dialog_delegate.h" | 24 #include "views/window/dialog_delegate.h" |
| 25 #include "views/window/window.h" | 25 #include "views/window/window.h" |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 // A dialog box that asks the user to confirm resetting settings. | 29 // A dialog box that asks the user to confirm resetting settings. |
| 30 class ResetDefaultsConfirmBox : public views::DialogDelegate { | 30 class ResetDefaultsConfirmBox : public views::DialogDelegate { |
| 31 public: | 31 public: |
| 32 // This box is modal to |parent_hwnd|. | 32 // This box is modal to |parent_hwnd|. |
| 33 static void ShowConfirmBox(HWND parent_hwnd, AdvancedPageView* page_view) { | 33 static void ShowConfirmBox(HWND parent_hwnd, AdvancedPageView* page_view) { |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 new ManagedPrefsBannerView(profile()->GetPrefs(), OPTIONS_PAGE_ADVANCED)); | 141 new ManagedPrefsBannerView(profile()->GetPrefs(), OPTIONS_PAGE_ADVANCED)); |
| 142 | 142 |
| 143 layout->StartRow(1, single_column_view_set_id); | 143 layout->StartRow(1, single_column_view_set_id); |
| 144 layout->AddView(advanced_scroll_view_); | 144 layout->AddView(advanced_scroll_view_); |
| 145 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); | 145 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); |
| 146 | 146 |
| 147 layout->StartRow(0, single_column_view_set_id); | 147 layout->StartRow(0, single_column_view_set_id); |
| 148 layout->AddView(reset_to_default_button_, 1, 1, | 148 layout->AddView(reset_to_default_button_, 1, 1, |
| 149 GridLayout::TRAILING, GridLayout::CENTER); | 149 GridLayout::TRAILING, GridLayout::CENTER); |
| 150 } | 150 } |
| OLD | NEW |