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

Side by Side Diff: chrome/browser/ui/webui/options/browser_options_handler.cc

Issue 27196006: Add autoclick to settings page under the accessibility section. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unit test Created 7 years, 1 month 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
« no previous file with comments | « chrome/browser/resources/options/browser_options.js ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/options/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 "apps/shell_window.h" 10 #include "apps/shell_window.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 #include "grit/theme_resources.h" 88 #include "grit/theme_resources.h"
89 #include "third_party/skia/include/core/SkBitmap.h" 89 #include "third_party/skia/include/core/SkBitmap.h"
90 #include "ui/base/l10n/l10n_util.h" 90 #include "ui/base/l10n/l10n_util.h"
91 #include "ui/base/webui/web_ui_util.h" 91 #include "ui/base/webui/web_ui_util.h"
92 92
93 #if !defined(OS_CHROMEOS) 93 #if !defined(OS_CHROMEOS)
94 #include "chrome/browser/ui/webui/options/advanced_options_utils.h" 94 #include "chrome/browser/ui/webui/options/advanced_options_utils.h"
95 #endif 95 #endif
96 96
97 #if defined(OS_CHROMEOS) 97 #if defined(OS_CHROMEOS)
98 #include "ash/ash_switches.h"
98 #include "ash/magnifier/magnifier_constants.h" 99 #include "ash/magnifier/magnifier_constants.h"
99 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" 100 #include "chrome/browser/chromeos/accessibility/accessibility_util.h"
100 #include "chrome/browser/chromeos/extensions/wallpaper_manager_util.h" 101 #include "chrome/browser/chromeos/extensions/wallpaper_manager_util.h"
101 #include "chrome/browser/chromeos/login/user_manager.h" 102 #include "chrome/browser/chromeos/login/user_manager.h"
102 #include "chrome/browser/chromeos/settings/cros_settings.h" 103 #include "chrome/browser/chromeos/settings/cros_settings.h"
103 #include "chrome/browser/policy/browser_policy_connector.h" 104 #include "chrome/browser/policy/browser_policy_connector.h"
104 #include "chrome/browser/ui/browser_window.h" 105 #include "chrome/browser/ui/browser_window.h"
105 #include "chrome/browser/ui/webui/options/chromeos/timezone_options_util.h" 106 #include "chrome/browser/ui/webui/options/chromeos/timezone_options_util.h"
106 #include "chromeos/dbus/dbus_thread_manager.h" 107 #include "chromeos/dbus/dbus_thread_manager.h"
107 #include "chromeos/dbus/power_manager_client.h" 108 #include "chromeos/dbus/power_manager_client.h"
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 { "accessibilityStickyKeys", 340 { "accessibilityStickyKeys",
340 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_STICKY_KEYS_DESCRIPTION }, 341 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_STICKY_KEYS_DESCRIPTION },
341 { "accessibilitySpokenFeedback", 342 { "accessibilitySpokenFeedback",
342 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SPOKEN_FEEDBACK_DESCRIPTION }, 343 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SPOKEN_FEEDBACK_DESCRIPTION },
343 { "accessibilityTitle", 344 { "accessibilityTitle",
344 IDS_OPTIONS_SETTINGS_SECTION_TITLE_ACCESSIBILITY }, 345 IDS_OPTIONS_SETTINGS_SECTION_TITLE_ACCESSIBILITY },
345 { "accessibilityVirtualKeyboard", 346 { "accessibilityVirtualKeyboard",
346 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_VIRTUAL_KEYBOARD_DESCRIPTION }, 347 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_VIRTUAL_KEYBOARD_DESCRIPTION },
347 { "accessibilityAlwaysShowMenu", 348 { "accessibilityAlwaysShowMenu",
348 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SHOULD_ALWAYS_SHOW_MENU }, 349 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SHOULD_ALWAYS_SHOW_MENU },
350 { "accessibilityAutoclick",
351 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_AUTOCLICK_DESCRIPTION },
352 { "accessibilityAutoclickDropdown",
353 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_AUTOCLICK_DROPDOWN_DESCRIPTION },
354 { "autoclickDelayExtremelyShort",
355 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_AUTOCLICK_DELAY_EXTREMELY_SHORT },
356 { "autoclickDelayVeryShort",
357 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_AUTOCLICK_DELAY_VERY_SHORT },
358 { "autoclickDelayShort",
359 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_AUTOCLICK_DELAY_SHORT },
360 { "autoclickDelayLong",
361 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_AUTOCLICK_DELAY_LONG },
362 { "autoclickDelayVeryLong",
363 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_AUTOCLICK_DELAY_VERY_LONG },
349 { "enableContentProtectionAttestation", 364 { "enableContentProtectionAttestation",
350 IDS_OPTIONS_ENABLE_CONTENT_PROTECTION_ATTESTATION }, 365 IDS_OPTIONS_ENABLE_CONTENT_PROTECTION_ATTESTATION },
351 { "factoryResetHeading", IDS_OPTIONS_FACTORY_RESET_HEADING }, 366 { "factoryResetHeading", IDS_OPTIONS_FACTORY_RESET_HEADING },
352 { "factoryResetTitle", IDS_OPTIONS_FACTORY_RESET }, 367 { "factoryResetTitle", IDS_OPTIONS_FACTORY_RESET },
353 { "factoryResetRestart", IDS_OPTIONS_FACTORY_RESET_BUTTON }, 368 { "factoryResetRestart", IDS_OPTIONS_FACTORY_RESET_BUTTON },
354 { "factoryResetDataRestart", IDS_RELAUNCH_BUTTON }, 369 { "factoryResetDataRestart", IDS_RELAUNCH_BUTTON },
355 { "factoryResetWarning", IDS_OPTIONS_FACTORY_RESET_WARNING }, 370 { "factoryResetWarning", IDS_OPTIONS_FACTORY_RESET_WARNING },
356 { "factoryResetHelpUrl", IDS_FACTORY_RESET_HELP_URL }, 371 { "factoryResetHelpUrl", IDS_FACTORY_RESET_HELP_URL },
357 { "changePicture", IDS_OPTIONS_CHANGE_PICTURE_CAPTION }, 372 { "changePicture", IDS_OPTIONS_CHANGE_PICTURE_CAPTION },
358 { "datetimeTitle", IDS_OPTIONS_SETTINGS_SECTION_TITLE_DATETIME }, 373 { "datetimeTitle", IDS_OPTIONS_SETTINGS_SECTION_TITLE_DATETIME },
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 option_partial->AppendInteger(ash::MAGNIFIER_PARTIAL); 500 option_partial->AppendInteger(ash::MAGNIFIER_PARTIAL);
486 option_partial->Append(new base::StringValue(l10n_util::GetStringUTF16( 501 option_partial->Append(new base::StringValue(l10n_util::GetStringUTF16(
487 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SCREEN_MAGNIFIER_PARTIAL))); 502 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_SCREEN_MAGNIFIER_PARTIAL)));
488 magnifier_list->Append(option_partial.release()); 503 magnifier_list->Append(option_partial.release());
489 504
490 values->Set("magnifierList", magnifier_list.release()); 505 values->Set("magnifierList", magnifier_list.release());
491 506
492 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 507 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
493 values->SetBoolean("enableStickyKeys", 508 values->SetBoolean("enableStickyKeys",
494 command_line.HasSwitch(switches::kEnableStickyKeys)); 509 command_line.HasSwitch(switches::kEnableStickyKeys));
510 values->SetBoolean("enableAutoclick",
511 command_line.HasSwitch(
512 ash::switches::kAshEnableAutoclick));
495 #endif 513 #endif
496 514
497 #if defined(OS_MACOSX) 515 #if defined(OS_MACOSX)
498 values->SetString("macPasswordsWarning", 516 values->SetString("macPasswordsWarning",
499 l10n_util::GetStringUTF16(IDS_OPTIONS_PASSWORDS_MAC_WARNING)); 517 l10n_util::GetStringUTF16(IDS_OPTIONS_PASSWORDS_MAC_WARNING));
500 values->SetBoolean("multiple_profiles", 518 values->SetBoolean("multiple_profiles",
501 g_browser_process->profile_manager()->GetNumberOfProfiles() > 1); 519 g_browser_process->profile_manager()->GetNumberOfProfiles() > 1);
502 #endif 520 #endif
503 521
504 if (ShouldShowMultiProfilesUserList(helper::GetDesktopType(web_ui()))) 522 if (ShouldShowMultiProfilesUserList(helper::GetDesktopType(web_ui())))
(...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after
1549 base::FundamentalValue disabled(is_win_ash || (proxy_config && 1567 base::FundamentalValue disabled(is_win_ash || (proxy_config &&
1550 !proxy_config->IsUserModifiable())); 1568 !proxy_config->IsUserModifiable()));
1551 base::FundamentalValue extension_controlled(is_extension_controlled); 1569 base::FundamentalValue extension_controlled(is_extension_controlled);
1552 web_ui()->CallJavascriptFunction("BrowserOptions.setupProxySettingsSection", 1570 web_ui()->CallJavascriptFunction("BrowserOptions.setupProxySettingsSection",
1553 disabled, extension_controlled); 1571 disabled, extension_controlled);
1554 1572
1555 #endif // !defined(OS_CHROMEOS) 1573 #endif // !defined(OS_CHROMEOS)
1556 } 1574 }
1557 1575
1558 } // namespace options 1576 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/browser_options.js ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698