OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/webui/options2/browser_options_handler.h" | 5 #include "chrome/browser/ui/webui/options/browser_options_handler.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
14 #include "base/memory/singleton.h" | 14 #include "base/memory/singleton.h" |
15 #include "base/path_service.h" | 15 #include "base/path_service.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 #include "content/public/common/page_zoom.h" | 70 #include "content/public/common/page_zoom.h" |
71 #include "grit/chromium_strings.h" | 71 #include "grit/chromium_strings.h" |
72 #include "grit/generated_resources.h" | 72 #include "grit/generated_resources.h" |
73 #include "grit/locale_settings.h" | 73 #include "grit/locale_settings.h" |
74 #include "grit/theme_resources.h" | 74 #include "grit/theme_resources.h" |
75 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 75 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
76 #include "ui/base/l10n/l10n_util.h" | 76 #include "ui/base/l10n/l10n_util.h" |
77 | 77 |
78 #if !defined(OS_CHROMEOS) | 78 #if !defined(OS_CHROMEOS) |
79 #include "chrome/browser/printing/cloud_print/cloud_print_setup_handler.h" | 79 #include "chrome/browser/printing/cloud_print/cloud_print_setup_handler.h" |
80 #include "chrome/browser/ui/webui/options2/advanced_options_utils.h" | 80 #include "chrome/browser/ui/webui/options/advanced_options_utils.h" |
81 #endif | 81 #endif |
82 | 82 |
83 #if defined(OS_CHROMEOS) | 83 #if defined(OS_CHROMEOS) |
84 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 84 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
85 #include "chrome/browser/chromeos/extensions/wallpaper_manager_util.h" | 85 #include "chrome/browser/chromeos/extensions/wallpaper_manager_util.h" |
86 #include "chrome/browser/chromeos/login/user_manager.h" | 86 #include "chrome/browser/chromeos/login/user_manager.h" |
87 #include "chrome/browser/chromeos/options/take_photo_dialog.h" | 87 #include "chrome/browser/chromeos/options/take_photo_dialog.h" |
88 #include "chrome/browser/chromeos/settings/cros_settings.h" | 88 #include "chrome/browser/chromeos/settings/cros_settings.h" |
89 #include "chrome/browser/ui/browser_window.h" | 89 #include "chrome/browser/ui/browser_window.h" |
90 #include "chrome/browser/ui/webui/options2/chromeos/timezone_options_util.h" | 90 #include "chrome/browser/ui/webui/options/chromeos/timezone_options_util.h" |
91 #include "ui/gfx/image/image_skia.h" | 91 #include "ui/gfx/image/image_skia.h" |
92 #endif // defined(OS_CHROMEOS) | 92 #endif // defined(OS_CHROMEOS) |
93 | 93 |
94 #if defined(OS_WIN) | 94 #if defined(OS_WIN) |
95 #include "chrome/installer/util/auto_launch_util.h" | 95 #include "chrome/installer/util/auto_launch_util.h" |
96 #endif // defined(OS_WIN) | 96 #endif // defined(OS_WIN) |
97 | 97 |
98 #if defined(TOOLKIT_GTK) | 98 #if defined(TOOLKIT_GTK) |
99 #include "chrome/browser/ui/gtk/gtk_theme_service.h" | 99 #include "chrome/browser/ui/gtk/gtk_theme_service.h" |
100 #endif // defined(TOOLKIT_GTK) | 100 #endif // defined(TOOLKIT_GTK) |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 IDS_OPTIONS_ADVANCED_SECTION_TITLE_PRIVACY }, | 162 IDS_OPTIONS_ADVANCED_SECTION_TITLE_PRIVACY }, |
163 { "advancedSectionTitleSecurity", | 163 { "advancedSectionTitleSecurity", |
164 IDS_OPTIONS_ADVANCED_SECTION_TITLE_SECURITY }, | 164 IDS_OPTIONS_ADVANCED_SECTION_TITLE_SECURITY }, |
165 { "autofillEnabled", IDS_OPTIONS_AUTOFILL_ENABLE }, | 165 { "autofillEnabled", IDS_OPTIONS_AUTOFILL_ENABLE }, |
166 { "autologinEnabled", IDS_OPTIONS_PASSWORDS_AUTOLOGIN }, | 166 { "autologinEnabled", IDS_OPTIONS_PASSWORDS_AUTOLOGIN }, |
167 { "autoOpenFileTypesInfo", IDS_OPTIONS_OPEN_FILE_TYPES_AUTOMATICALLY }, | 167 { "autoOpenFileTypesInfo", IDS_OPTIONS_OPEN_FILE_TYPES_AUTOMATICALLY }, |
168 { "autoOpenFileTypesResetToDefault", | 168 { "autoOpenFileTypesResetToDefault", |
169 IDS_OPTIONS_AUTOOPENFILETYPES_RESETTODEFAULT }, | 169 IDS_OPTIONS_AUTOOPENFILETYPES_RESETTODEFAULT }, |
170 { "changeHomePage", IDS_OPTIONS_CHANGE_HOME_PAGE }, | 170 { "changeHomePage", IDS_OPTIONS_CHANGE_HOME_PAGE }, |
171 { "certificatesManageButton", IDS_OPTIONS_CERTIFICATES_MANAGE_BUTTON }, | 171 { "certificatesManageButton", IDS_OPTIONS_CERTIFICATES_MANAGE_BUTTON }, |
172 { "customizeSync", IDS_OPTIONS2_CUSTOMIZE_SYNC_BUTTON_LABEL }, | 172 { "customizeSync", IDS_OPTIONS_CUSTOMIZE_SYNC_BUTTON_LABEL }, |
173 { "defaultFontSizeLabel", IDS_OPTIONS_DEFAULT_FONT_SIZE_LABEL }, | 173 { "defaultFontSizeLabel", IDS_OPTIONS_DEFAULT_FONT_SIZE_LABEL }, |
174 { "defaultSearchManageEngines", IDS_OPTIONS_DEFAULTSEARCH_MANAGE_ENGINES }, | 174 { "defaultSearchManageEngines", IDS_OPTIONS_DEFAULTSEARCH_MANAGE_ENGINES }, |
175 { "defaultZoomFactorLabel", IDS_OPTIONS_DEFAULT_ZOOM_LEVEL_LABEL }, | 175 { "defaultZoomFactorLabel", IDS_OPTIONS_DEFAULT_ZOOM_LEVEL_LABEL }, |
176 #if defined(OS_CHROMEOS) | 176 #if defined(OS_CHROMEOS) |
177 { "disableGData", IDS_OPTIONS_DISABLE_GDATA }, | 177 { "disableGData", IDS_OPTIONS_DISABLE_GDATA }, |
178 #endif | 178 #endif |
179 { "disableWebServices", IDS_OPTIONS_DISABLE_WEB_SERVICES }, | 179 { "disableWebServices", IDS_OPTIONS_DISABLE_WEB_SERVICES }, |
180 #if defined(OS_CHROMEOS) | 180 #if defined(OS_CHROMEOS) |
181 { "displayOptionsButton", IDS_OPTIONS_SETTINGS_DISPLAY_OPTIONS_TAB_TITLE }, | 181 { "displayOptionsButton", IDS_OPTIONS_SETTINGS_DISPLAY_OPTIONS_TAB_TITLE }, |
182 { "displayOptionsTitle", IDS_OPTIONS_SETTINGS_SECTION_TITLE_DISPLAY }, | 182 { "displayOptionsTitle", IDS_OPTIONS_SETTINGS_SECTION_TITLE_DISPLAY }, |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 { "sectionTitleSync", IDS_SYNC_OPTIONS_GROUP_NAME }, | 241 { "sectionTitleSync", IDS_SYNC_OPTIONS_GROUP_NAME }, |
242 { "spellingConfirmMessage", IDS_CONTENT_CONTEXT_SPELLING_BUBBLE_TEXT }, | 242 { "spellingConfirmMessage", IDS_CONTENT_CONTEXT_SPELLING_BUBBLE_TEXT }, |
243 { "spellingConfirmTitle", IDS_CONTENT_CONTEXT_SPELLING_ASK_GOOGLE }, | 243 { "spellingConfirmTitle", IDS_CONTENT_CONTEXT_SPELLING_ASK_GOOGLE }, |
244 { "spellingConfirmEnable", IDS_CONTENT_CONTEXT_SPELLING_BUBBLE_ENABLE }, | 244 { "spellingConfirmEnable", IDS_CONTENT_CONTEXT_SPELLING_BUBBLE_ENABLE }, |
245 { "spellingConfirmDisable", IDS_CONTENT_CONTEXT_SPELLING_BUBBLE_DISABLE }, | 245 { "spellingConfirmDisable", IDS_CONTENT_CONTEXT_SPELLING_BUBBLE_DISABLE }, |
246 { "spellingPref", IDS_OPTIONS_SPELLING_PREF }, | 246 { "spellingPref", IDS_OPTIONS_SPELLING_PREF }, |
247 { "startupRestoreLastSession", IDS_OPTIONS_STARTUP_RESTORE_LAST_SESSION }, | 247 { "startupRestoreLastSession", IDS_OPTIONS_STARTUP_RESTORE_LAST_SESSION }, |
248 { "settingsTitle", IDS_SETTINGS_TITLE }, | 248 { "settingsTitle", IDS_SETTINGS_TITLE }, |
249 { "showAdvancedSettings", IDS_SETTINGS_SHOW_ADVANCED_SETTINGS }, | 249 { "showAdvancedSettings", IDS_SETTINGS_SHOW_ADVANCED_SETTINGS }, |
250 { "sslCheckRevocation", IDS_OPTIONS_SSL_CHECKREVOCATION }, | 250 { "sslCheckRevocation", IDS_OPTIONS_SSL_CHECKREVOCATION }, |
251 { "startupSetPages", IDS_OPTIONS2_STARTUP_SET_PAGES }, | 251 { "startupSetPages", IDS_OPTIONS_STARTUP_SET_PAGES }, |
252 { "startupShowNewTab", IDS_OPTIONS2_STARTUP_SHOW_NEWTAB }, | 252 { "startupShowNewTab", IDS_OPTIONS_STARTUP_SHOW_NEWTAB }, |
253 { "startupShowPages", IDS_OPTIONS2_STARTUP_SHOW_PAGES }, | 253 { "startupShowPages", IDS_OPTIONS_STARTUP_SHOW_PAGES }, |
254 { "suggestPref", IDS_OPTIONS_SUGGEST_PREF }, | 254 { "suggestPref", IDS_OPTIONS_SUGGEST_PREF }, |
255 { "syncButtonTextInProgress", IDS_SYNC_NTP_SETUP_IN_PROGRESS }, | 255 { "syncButtonTextInProgress", IDS_SYNC_NTP_SETUP_IN_PROGRESS }, |
256 { "syncButtonTextStop", IDS_SYNC_STOP_SYNCING_BUTTON_LABEL }, | 256 { "syncButtonTextStop", IDS_SYNC_STOP_SYNCING_BUTTON_LABEL }, |
257 { "themesGallery", IDS_THEMES_GALLERY_BUTTON }, | 257 { "themesGallery", IDS_THEMES_GALLERY_BUTTON }, |
258 { "themesGalleryURL", IDS_THEMES_GALLERY_URL }, | 258 { "themesGalleryURL", IDS_THEMES_GALLERY_URL }, |
259 { "tabsToLinksPref", IDS_OPTIONS_TABS_TO_LINKS_PREF }, | 259 { "tabsToLinksPref", IDS_OPTIONS_TABS_TO_LINKS_PREF }, |
260 { "toolbarShowBookmarksBar", IDS_OPTIONS_TOOLBAR_SHOW_BOOKMARKS_BAR }, | 260 { "toolbarShowBookmarksBar", IDS_OPTIONS_TOOLBAR_SHOW_BOOKMARKS_BAR }, |
261 { "toolbarShowHomeButton", IDS_OPTIONS_TOOLBAR_SHOW_HOME_BUTTON }, | 261 { "toolbarShowHomeButton", IDS_OPTIONS_TOOLBAR_SHOW_HOME_BUTTON }, |
262 { "translateEnableTranslate", | 262 { "translateEnableTranslate", |
263 IDS_OPTIONS_TRANSLATE_ENABLE_TRANSLATE }, | 263 IDS_OPTIONS_TRANSLATE_ENABLE_TRANSLATE }, |
(...skipping 12 matching lines...) Expand all Loading... |
276 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SCREEN_MAGNIFIER_DESCRIPTION }, | 276 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SCREEN_MAGNIFIER_DESCRIPTION }, |
277 { "accessibilitySpokenFeedback", | 277 { "accessibilitySpokenFeedback", |
278 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_DESCRIPTION }, | 278 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_DESCRIPTION }, |
279 { "accessibilityTitle", | 279 { "accessibilityTitle", |
280 IDS_OPTIONS_SETTINGS_SECTION_TITLE_ACCESSIBILITY }, | 280 IDS_OPTIONS_SETTINGS_SECTION_TITLE_ACCESSIBILITY }, |
281 { "accessibilityVirtualKeyboard", | 281 { "accessibilityVirtualKeyboard", |
282 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_VIRTUAL_KEYBOARD_DESCRIPTION }, | 282 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_VIRTUAL_KEYBOARD_DESCRIPTION }, |
283 { "changePicture", IDS_OPTIONS_CHANGE_PICTURE_CAPTION }, | 283 { "changePicture", IDS_OPTIONS_CHANGE_PICTURE_CAPTION }, |
284 { "datetimeTitle", IDS_OPTIONS_SETTINGS_SECTION_TITLE_DATETIME }, | 284 { "datetimeTitle", IDS_OPTIONS_SETTINGS_SECTION_TITLE_DATETIME }, |
285 { "deviceGroupDescription", IDS_OPTIONS_DEVICE_GROUP_DESCRIPTION }, | 285 { "deviceGroupDescription", IDS_OPTIONS_DEVICE_GROUP_DESCRIPTION }, |
286 { "deviceGroupPointer", IDS_OPTIONS2_DEVICE_GROUP_POINTER_SECTION }, | 286 { "deviceGroupPointer", IDS_OPTIONS_DEVICE_GROUP_POINTER_SECTION }, |
287 { "mouseSpeed", IDS_OPTIONS2_SETTINGS_MOUSE_SPEED_DESCRIPTION }, | 287 { "mouseSpeed", IDS_OPTIONS_SETTINGS_MOUSE_SPEED_DESCRIPTION }, |
288 { "touchpadSpeed", IDS_OPTIONS2_SETTINGS_TOUCHPAD_SPEED_DESCRIPTION }, | 288 { "touchpadSpeed", IDS_OPTIONS_SETTINGS_TOUCHPAD_SPEED_DESCRIPTION }, |
289 { "enableScreenlock", IDS_OPTIONS_ENABLE_SCREENLOCKER_CHECKBOX }, | 289 { "enableScreenlock", IDS_OPTIONS_ENABLE_SCREENLOCKER_CHECKBOX }, |
290 { "internetOptionsButtonTitle", IDS_OPTIONS_INTERNET_OPTIONS_BUTTON_TITLE }, | 290 { "internetOptionsButtonTitle", IDS_OPTIONS_INTERNET_OPTIONS_BUTTON_TITLE }, |
291 { "keyboardSettingsButtonTitle", | 291 { "keyboardSettingsButtonTitle", |
292 IDS_OPTIONS2_DEVICE_GROUP_KEYBOARD_SETTINGS_BUTTON_TITLE }, | 292 IDS_OPTIONS_DEVICE_GROUP_KEYBOARD_SETTINGS_BUTTON_TITLE }, |
293 { "manageAccountsButtonTitle", IDS_OPTIONS_ACCOUNTS_BUTTON_TITLE }, | 293 { "manageAccountsButtonTitle", IDS_OPTIONS_ACCOUNTS_BUTTON_TITLE }, |
294 { "noPointingDevices", IDS_OPTIONS_NO_POINTING_DEVICES }, | 294 { "noPointingDevices", IDS_OPTIONS_NO_POINTING_DEVICES }, |
295 { "sectionTitleDevice", IDS_OPTIONS_DEVICE_GROUP_NAME }, | 295 { "sectionTitleDevice", IDS_OPTIONS_DEVICE_GROUP_NAME }, |
296 { "sectionTitleInternet", IDS_OPTIONS_INTERNET_OPTIONS_GROUP_LABEL }, | 296 { "sectionTitleInternet", IDS_OPTIONS_INTERNET_OPTIONS_GROUP_LABEL }, |
297 { "syncOverview", IDS_SYNC_OVERVIEW }, | 297 { "syncOverview", IDS_SYNC_OVERVIEW }, |
298 { "syncButtonTextStart", IDS_SYNC_SETUP_BUTTON_LABEL }, | 298 { "syncButtonTextStart", IDS_SYNC_SETUP_BUTTON_LABEL }, |
299 { "timezone", IDS_OPTIONS_SETTINGS_TIMEZONE_DESCRIPTION }, | 299 { "timezone", IDS_OPTIONS_SETTINGS_TIMEZONE_DESCRIPTION }, |
300 { "use24HourClock", IDS_OPTIONS_SETTINGS_USE_24HOUR_CLOCK_DESCRIPTION }, | 300 { "use24HourClock", IDS_OPTIONS_SETTINGS_USE_24HOUR_CLOCK_DESCRIPTION }, |
301 #else | 301 #else |
302 { "cloudPrintConnectorEnabledManageButton", | 302 { "cloudPrintConnectorEnabledManageButton", |
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1433 } | 1433 } |
1434 | 1434 |
1435 void BrowserOptionsHandler::SetupSSLConfigSettings() { | 1435 void BrowserOptionsHandler::SetupSSLConfigSettings() { |
1436 base::FundamentalValue checked(rev_checking_enabled_.GetValue()); | 1436 base::FundamentalValue checked(rev_checking_enabled_.GetValue()); |
1437 base::FundamentalValue disabled(rev_checking_enabled_.IsManaged()); | 1437 base::FundamentalValue disabled(rev_checking_enabled_.IsManaged()); |
1438 web_ui()->CallJavascriptFunction( | 1438 web_ui()->CallJavascriptFunction( |
1439 "BrowserOptions.setCheckRevocationCheckboxState", checked, disabled); | 1439 "BrowserOptions.setCheckRevocationCheckboxState", checked, disabled); |
1440 } | 1440 } |
1441 | 1441 |
1442 } // namespace options | 1442 } // namespace options |
OLD | NEW |