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

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

Issue 2905373002: Set keys for SwitchAccessEventHandler to capture using accessibiltyPrivate API (Closed)
Patch Set: Updated extension histograms Created 3 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 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after
1526 const std::string& id, 1526 const std::string& id,
1527 content::BrowserContext* context) { 1527 content::BrowserContext* context) {
1528 keyboard_listener_extension_id_ = id; 1528 keyboard_listener_extension_id_ = id;
1529 1529
1530 extensions::ExtensionRegistry* registry = 1530 extensions::ExtensionRegistry* registry =
1531 extensions::ExtensionRegistry::Get(context); 1531 extensions::ExtensionRegistry::Get(context);
1532 if (!extension_registry_observer_.IsObserving(registry) && !id.empty()) 1532 if (!extension_registry_observer_.IsObserving(registry) && !id.empty())
1533 extension_registry_observer_.Add(registry); 1533 extension_registry_observer_.Add(registry);
1534 } 1534 }
1535 1535
1536 void AccessibilityManager::SetSwitchAccessKeys(
1537 const std::vector<int>& key_codes) {
1538 if (switch_access_enabled_)
1539 switch_access_event_handler_->SetKeysToCapture(key_codes);
1540 }
1541
1536 } // namespace chromeos 1542 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698