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

Side by Side Diff: chrome/browser/chromeos/accessibility/accessibility_manager.cc

Issue 2016073004: Show a visual indicator for the progress of auto-click. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Used a timedelta in autoclick controller instead of int. Created 4 years, 6 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/chromeos/accessibility/accessibility_manager.h" 5 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 return; 853 return;
854 854
855 int autoclick_delay_ms = 855 int autoclick_delay_ms =
856 profile_->GetPrefs()->GetInteger(prefs::kAccessibilityAutoclickDelayMs); 856 profile_->GetPrefs()->GetInteger(prefs::kAccessibilityAutoclickDelayMs);
857 857
858 if (autoclick_delay_ms == autoclick_delay_ms_) 858 if (autoclick_delay_ms == autoclick_delay_ms_)
859 return; 859 return;
860 autoclick_delay_ms_ = autoclick_delay_ms; 860 autoclick_delay_ms_ = autoclick_delay_ms;
861 861
862 ash::Shell::GetInstance()->autoclick_controller()->SetAutoclickDelay( 862 ash::Shell::GetInstance()->autoclick_controller()->SetAutoclickDelay(
863 autoclick_delay_ms_); 863 base::TimeDelta::FromMilliseconds(
864 static_cast<int64_t>(autoclick_delay_ms_)));
jdufault 2016/06/09 16:41:26 Parse the time value into a TimeDelta instance whe
sammiequon 2016/06/10 19:30:26 Done.
864 } 865 }
865 866
866 void AccessibilityManager::EnableVirtualKeyboard(bool enabled) { 867 void AccessibilityManager::EnableVirtualKeyboard(bool enabled) {
867 if (!profile_) 868 if (!profile_)
868 return; 869 return;
869 870
870 PrefService* pref_service = profile_->GetPrefs(); 871 PrefService* pref_service = profile_->GetPrefs();
871 pref_service->SetBoolean(prefs::kAccessibilityVirtualKeyboardEnabled, 872 pref_service->SetBoolean(prefs::kAccessibilityVirtualKeyboardEnabled,
872 enabled); 873 enabled);
873 pref_service->CommitPendingWrite(); 874 pref_service->CommitPendingWrite();
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after
1535 content::BrowserContext* context) { 1536 content::BrowserContext* context) {
1536 keyboard_listener_extension_id_ = id; 1537 keyboard_listener_extension_id_ = id;
1537 1538
1538 extensions::ExtensionRegistry* registry = 1539 extensions::ExtensionRegistry* registry =
1539 extensions::ExtensionRegistry::Get(context); 1540 extensions::ExtensionRegistry::Get(context);
1540 if (!extension_registry_observer_.IsObserving(registry) && !id.empty()) 1541 if (!extension_registry_observer_.IsObserving(registry) && !id.empty())
1541 extension_registry_observer_.Add(registry); 1542 extension_registry_observer_.Add(registry);
1542 } 1543 }
1543 1544
1544 } // namespace chromeos 1545 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698