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

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

Issue 558066: Autofill dialog for the Mac. This is UI only at this point. The UI is not h... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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/cocoa/preferences_window_controller.h" 5 #import "chrome/browser/cocoa/preferences_window_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "app/l10n_util_mac.h" 9 #include "app/l10n_util_mac.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/mac_util.h" 11 #include "base/mac_util.h"
12 #include "base/string16.h" 12 #include "base/string16.h"
13 #include "base/string_util.h" 13 #include "base/string_util.h"
14 #include "base/sys_string_conversions.h" 14 #include "base/sys_string_conversions.h"
15 #include "chrome/browser/autofill/autofill_dialog.h"
16 #include "chrome/browser/autofill/autofill_type.h"
17 #include "chrome/browser/autofill/personal_data_manager.h"
15 #include "chrome/browser/browser.h" 18 #include "chrome/browser/browser.h"
16 #include "chrome/browser/browser_list.h" 19 #include "chrome/browser/browser_list.h"
17 #include "chrome/browser/browser_process.h" 20 #include "chrome/browser/browser_process.h"
18 #import "chrome/browser/cocoa/clear_browsing_data_controller.h" 21 #import "chrome/browser/cocoa/clear_browsing_data_controller.h"
19 #import "chrome/browser/cocoa/cookies_window_controller.h" 22 #import "chrome/browser/cocoa/cookies_window_controller.h"
20 #import "chrome/browser/cocoa/custom_home_pages_model.h" 23 #import "chrome/browser/cocoa/custom_home_pages_model.h"
21 #import "chrome/browser/cocoa/font_language_settings_controller.h" 24 #import "chrome/browser/cocoa/font_language_settings_controller.h"
22 #import "chrome/browser/cocoa/import_settings_dialog.h" 25 #import "chrome/browser/cocoa/import_settings_dialog.h"
23 #import "chrome/browser/cocoa/keyword_editor_cocoa_controller.h" 26 #import "chrome/browser/cocoa/keyword_editor_cocoa_controller.h"
24 #import "chrome/browser/cocoa/search_engine_list_model.h" 27 #import "chrome/browser/cocoa/search_engine_list_model.h"
(...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 } 1141 }
1139 } 1142 }
1140 1143
1141 // Called to launch the Keychain Access app to show the user's stored 1144 // Called to launch the Keychain Access app to show the user's stored
1142 // passwords. 1145 // passwords.
1143 - (IBAction)showSavedPasswords:(id)sender { 1146 - (IBAction)showSavedPasswords:(id)sender {
1144 [self recordUserAction:"Options_ShowPasswordsExceptions"]; 1147 [self recordUserAction:"Options_ShowPasswordsExceptions"];
1145 [self launchKeychainAccess]; 1148 [self launchKeychainAccess];
1146 } 1149 }
1147 1150
1151 // Called to show the Auto Fill Settings dialog.
1152 - (IBAction)showAutoFillSettings:(id)sender {
1153 [self recordUserAction:"Options_ShowAutoFillSettings"];
1154
1155 // TODO(dhollowa): Need "n" of these. Create single entry for now.
1156 // See http://crbug.com/33029.
1157 std::vector<AutoFillProfile*> profiles;
1158 AutoFillProfile profile(ASCIIToUTF16(""), 0);
1159 profiles.push_back(&profile);
1160
1161 // TODO(dhollowa): Need "n" of these. Create single entry for now.
1162 // See http://crbug.com/33029.
1163 std::vector<CreditCard*> creditCards;
1164 CreditCard creditCard(ASCIIToUTF16(""), 0);
1165 creditCards.push_back(&creditCard);
1166
1167 // TODO(dhollowa): There are outstanding assertions in autofill back end.
1168 // Hooking up with UI only until those issues are resolved.
1169 // See http://crbug.com/33029.
1170 ShowAutoFillDialog(NULL, profiles, creditCards);
1171 }
1172
1148 // Called to import data from other browsers (Safari, Firefox, etc). 1173 // Called to import data from other browsers (Safari, Firefox, etc).
1149 - (IBAction)importData:(id)sender { 1174 - (IBAction)importData:(id)sender {
1150 UserMetrics::RecordAction("Import_ShowDlg", profile_); 1175 UserMetrics::RecordAction("Import_ShowDlg", profile_);
1151 [ImportSettingsDialogController showImportSettingsDialogForProfile:profile_]; 1176 [ImportSettingsDialogController showImportSettingsDialogForProfile:profile_];
1152 } 1177 }
1153 1178
1154 // Called to clear user's browsing data. This puts up an application-modal 1179 // Called to clear user's browsing data. This puts up an application-modal
1155 // dialog to guide the user through clearing the data. 1180 // dialog to guide the user through clearing the data.
1156 - (IBAction)clearData:(id)sender { 1181 - (IBAction)clearData:(id)sender {
1157 [ClearBrowsingDataController 1182 [ClearBrowsingDataController
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
1795 case OPTIONS_PAGE_ADVANCED: 1820 case OPTIONS_PAGE_ADVANCED:
1796 return underTheHoodView_; 1821 return underTheHoodView_;
1797 case OPTIONS_PAGE_DEFAULT: 1822 case OPTIONS_PAGE_DEFAULT:
1798 case OPTIONS_PAGE_COUNT: 1823 case OPTIONS_PAGE_COUNT:
1799 LOG(DFATAL) << "Invalid page value " << page; 1824 LOG(DFATAL) << "Invalid page value " << page;
1800 } 1825 }
1801 return basicsView_; 1826 return basicsView_;
1802 } 1827 }
1803 1828
1804 @end 1829 @end
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/preferences_window_controller.h ('k') | chrome/browser/cocoa/section_separator_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698