| 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 #include "chrome/browser/views/autofill_profiles_view_win.h" | 4 #include "chrome/browser/views/autofill_profiles_view_win.h" |
| 5 | 5 |
| 6 #include <vsstyle.h> | 6 #include <vsstyle.h> |
| 7 #include <vssym32.h> | 7 #include <vssym32.h> |
| 8 | 8 |
| 9 #include "app/gfx/canvas.h" | 9 #include "app/gfx/canvas.h" |
| 10 #include "app/gfx/native_theme_win.h" | 10 #include "app/gfx/native_theme_win.h" |
| 11 #include "app/l10n_util.h" | 11 #include "app/l10n_util.h" |
| 12 #include "app/resource_bundle.h" | 12 #include "app/resource_bundle.h" |
| 13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
| 14 #include "chrome/browser/browser.h" | 14 #include "chrome/browser/browser.h" |
| 15 #include "chrome/browser/browser_list.h" | 15 #include "chrome/browser/browser_list.h" |
| 16 #include "chrome/browser/browser_window.h" | 16 #include "chrome/browser/browser_window.h" |
| 17 #include "chrome/browser/pref_service.h" |
| 17 #include "chrome/browser/profile.h" | 18 #include "chrome/browser/profile.h" |
| 18 #include "chrome/browser/theme_resources_util.h" | 19 #include "chrome/browser/theme_resources_util.h" |
| 19 #include "chrome/browser/window_sizer.h" | 20 #include "chrome/browser/window_sizer.h" |
| 21 #include "chrome/common/pref_names.h" |
| 20 #include "gfx/size.h" | 22 #include "gfx/size.h" |
| 21 #include "grit/generated_resources.h" | 23 #include "grit/generated_resources.h" |
| 22 #include "grit/locale_settings.h" | 24 #include "grit/locale_settings.h" |
| 23 #include "views/border.h" | 25 #include "views/border.h" |
| 24 #include "views/controls/button/image_button.h" | 26 #include "views/controls/button/image_button.h" |
| 25 #include "views/controls/button/native_button.h" | 27 #include "views/controls/button/native_button.h" |
| 26 #include "views/controls/label.h" | 28 #include "views/controls/label.h" |
| 27 #include "views/controls/scroll_view.h" | 29 #include "views/controls/scroll_view.h" |
| 28 #include "views/controls/separator.h" | 30 #include "views/controls/separator.h" |
| 29 #include "views/grid_layout.h" | 31 #include "views/grid_layout.h" |
| (...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1152 lb.Inset(border.width(), border.height()); | 1154 lb.Inset(border.width(), border.height()); |
| 1153 scroll_view_->SetBounds(lb); | 1155 scroll_view_->SetBounds(lb); |
| 1154 scroll_view_->Layout(); | 1156 scroll_view_->Layout(); |
| 1155 } | 1157 } |
| 1156 | 1158 |
| 1157 // Declared in "chrome/browser/autofill/autofill_dialog.h" | 1159 // Declared in "chrome/browser/autofill/autofill_dialog.h" |
| 1158 void ShowAutoFillDialog(gfx::NativeWindow parent, | 1160 void ShowAutoFillDialog(gfx::NativeWindow parent, |
| 1159 AutoFillDialogObserver* observer, | 1161 AutoFillDialogObserver* observer, |
| 1160 Profile* profile) { | 1162 Profile* profile) { |
| 1161 DCHECK(profile); | 1163 DCHECK(profile); |
| 1164 |
| 1165 // It's possible we haven't shown the InfoBar yet, but if the user is in the |
| 1166 // AutoFill dialog, she doesn't need to be asked to enable or disable |
| 1167 // AutoFill. |
| 1168 profile->GetPrefs()->SetBoolean(prefs::kAutoFillInfoBarShown, true); |
| 1169 |
| 1162 PersonalDataManager* personal_data_manager = | 1170 PersonalDataManager* personal_data_manager = |
| 1163 profile->GetPersonalDataManager(); | 1171 profile->GetPersonalDataManager(); |
| 1164 DCHECK(personal_data_manager); | 1172 DCHECK(personal_data_manager); |
| 1165 AutoFillProfilesView::Show(parent, observer, personal_data_manager); | 1173 AutoFillProfilesView::Show(parent, observer, personal_data_manager); |
| 1166 } | 1174 } |
| 1167 | 1175 |
| OLD | NEW |