| OLD | NEW |
| 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 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 1408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1419 ash::PlaySystemSoundAlways(SOUND_SPOKEN_FEEDBACK_DISABLED); | 1419 ash::PlaySystemSoundAlways(SOUND_SPOKEN_FEEDBACK_DISABLED); |
| 1420 // Clear the accessibility focus ring. | 1420 // Clear the accessibility focus ring. |
| 1421 AccessibilityFocusRingController::GetInstance()->SetFocusRing( | 1421 AccessibilityFocusRingController::GetInstance()->SetFocusRing( |
| 1422 std::vector<gfx::Rect>()); | 1422 std::vector<gfx::Rect>()); |
| 1423 } | 1423 } |
| 1424 | 1424 |
| 1425 void AccessibilityManager::OnChromeVoxPanelClosing() { | 1425 void AccessibilityManager::OnChromeVoxPanelClosing() { |
| 1426 aura::Window* root_window = chromevox_panel_->GetRootWindow(); | 1426 aura::Window* root_window = chromevox_panel_->GetRootWindow(); |
| 1427 chromevox_panel_widget_observer_.reset(nullptr); | 1427 chromevox_panel_widget_observer_.reset(nullptr); |
| 1428 chromevox_panel_ = nullptr; | 1428 chromevox_panel_ = nullptr; |
| 1429 ash::Shelf::ForWindow(root_window) | 1429 |
| 1430 ->shelf_layout_manager() | 1430 ash::Shelf* shelf = ash::Shelf::ForWindow(root_window); |
| 1431 ->SetChromeVoxPanelHeight(0); | 1431 if (!shelf) |
| 1432 return; |
| 1433 |
| 1434 ash::ShelfLayoutManager* shelf_layout_manager = shelf->shelf_layout_manager(); |
| 1435 if (shelf_layout_manager) |
| 1436 shelf_layout_manager->SetChromeVoxPanelHeight(0); |
| 1432 } | 1437 } |
| 1433 | 1438 |
| 1434 void AccessibilityManager::OnChromeVoxPanelDestroying() { | 1439 void AccessibilityManager::OnChromeVoxPanelDestroying() { |
| 1435 chromevox_panel_widget_observer_.reset(nullptr); | 1440 chromevox_panel_widget_observer_.reset(nullptr); |
| 1436 chromevox_panel_ = nullptr; | 1441 chromevox_panel_ = nullptr; |
| 1437 } | 1442 } |
| 1438 | 1443 |
| 1439 void AccessibilityManager::SetKeyboardListenerExtensionId( | 1444 void AccessibilityManager::SetKeyboardListenerExtensionId( |
| 1440 const std::string& id, | 1445 const std::string& id, |
| 1441 content::BrowserContext* context) { | 1446 content::BrowserContext* context) { |
| 1442 keyboard_listener_extension_id_ = id; | 1447 keyboard_listener_extension_id_ = id; |
| 1443 | 1448 |
| 1444 extensions::ExtensionRegistry* registry = | 1449 extensions::ExtensionRegistry* registry = |
| 1445 extensions::ExtensionRegistry::Get(context); | 1450 extensions::ExtensionRegistry::Get(context); |
| 1446 if (!extension_registry_observer_.IsObserving(registry) && !id.empty()) | 1451 if (!extension_registry_observer_.IsObserving(registry) && !id.empty()) |
| 1447 extension_registry_observer_.Add(registry); | 1452 extension_registry_observer_.Add(registry); |
| 1448 } | 1453 } |
| 1449 | 1454 |
| 1450 } // namespace chromeos | 1455 } // namespace chromeos |
| OLD | NEW |