| 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 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <utility> | 11 #include <utility> |
| 12 | 12 |
| 13 #include "ash/aura/wm_window_aura.h" |
| 13 #include "ash/autoclick/autoclick_controller.h" | 14 #include "ash/autoclick/autoclick_controller.h" |
| 14 #include "ash/common/session/session_state_delegate.h" | 15 #include "ash/common/session/session_state_delegate.h" |
| 15 #include "ash/common/wm_shell.h" | 16 #include "ash/common/wm_shell.h" |
| 16 #include "ash/high_contrast/high_contrast_controller.h" | 17 #include "ash/high_contrast/high_contrast_controller.h" |
| 17 #include "ash/root_window_controller.h" | 18 #include "ash/root_window_controller.h" |
| 18 #include "ash/shelf/shelf.h" | 19 #include "ash/shelf/shelf.h" |
| 19 #include "ash/shelf/shelf_layout_manager.h" | 20 #include "ash/shelf/shelf_layout_manager.h" |
| 20 #include "ash/shell.h" | 21 #include "ash/shell.h" |
| 21 #include "ash/sticky_keys/sticky_keys_controller.h" | 22 #include "ash/sticky_keys/sticky_keys_controller.h" |
| 22 #include "base/callback.h" | 23 #include "base/callback.h" |
| (...skipping 1492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1515 AccessibilityFocusRingController::GetInstance()->SetFocusRing( | 1516 AccessibilityFocusRingController::GetInstance()->SetFocusRing( |
| 1516 std::vector<gfx::Rect>(), | 1517 std::vector<gfx::Rect>(), |
| 1517 AccessibilityFocusRingController::PERSIST_FOCUS_RING); | 1518 AccessibilityFocusRingController::PERSIST_FOCUS_RING); |
| 1518 } | 1519 } |
| 1519 | 1520 |
| 1520 void AccessibilityManager::OnChromeVoxPanelClosing() { | 1521 void AccessibilityManager::OnChromeVoxPanelClosing() { |
| 1521 aura::Window* root_window = chromevox_panel_->GetRootWindow(); | 1522 aura::Window* root_window = chromevox_panel_->GetRootWindow(); |
| 1522 chromevox_panel_widget_observer_.reset(nullptr); | 1523 chromevox_panel_widget_observer_.reset(nullptr); |
| 1523 chromevox_panel_ = nullptr; | 1524 chromevox_panel_ = nullptr; |
| 1524 | 1525 |
| 1525 ash::Shelf* shelf = ash::Shelf::ForWindow(root_window); | 1526 ash::Shelf* shelf = |
| 1527 ash::Shelf::ForWindow(ash::WmWindowAura::Get(root_window)); |
| 1526 if (!shelf) | 1528 if (!shelf) |
| 1527 return; | 1529 return; |
| 1528 | 1530 |
| 1529 ash::ShelfLayoutManager* shelf_layout_manager = shelf->shelf_layout_manager(); | 1531 ash::ShelfLayoutManager* shelf_layout_manager = shelf->shelf_layout_manager(); |
| 1530 if (shelf_layout_manager) | 1532 if (shelf_layout_manager) |
| 1531 shelf_layout_manager->SetChromeVoxPanelHeight(0); | 1533 shelf_layout_manager->SetChromeVoxPanelHeight(0); |
| 1532 } | 1534 } |
| 1533 | 1535 |
| 1534 void AccessibilityManager::OnChromeVoxPanelDestroying() { | 1536 void AccessibilityManager::OnChromeVoxPanelDestroying() { |
| 1535 chromevox_panel_widget_observer_.reset(nullptr); | 1537 chromevox_panel_widget_observer_.reset(nullptr); |
| 1536 chromevox_panel_ = nullptr; | 1538 chromevox_panel_ = nullptr; |
| 1537 } | 1539 } |
| 1538 | 1540 |
| 1539 void AccessibilityManager::SetKeyboardListenerExtensionId( | 1541 void AccessibilityManager::SetKeyboardListenerExtensionId( |
| 1540 const std::string& id, | 1542 const std::string& id, |
| 1541 content::BrowserContext* context) { | 1543 content::BrowserContext* context) { |
| 1542 keyboard_listener_extension_id_ = id; | 1544 keyboard_listener_extension_id_ = id; |
| 1543 | 1545 |
| 1544 extensions::ExtensionRegistry* registry = | 1546 extensions::ExtensionRegistry* registry = |
| 1545 extensions::ExtensionRegistry::Get(context); | 1547 extensions::ExtensionRegistry::Get(context); |
| 1546 if (!extension_registry_observer_.IsObserving(registry) && !id.empty()) | 1548 if (!extension_registry_observer_.IsObserving(registry) && !id.empty()) |
| 1547 extension_registry_observer_.Add(registry); | 1549 extension_registry_observer_.Add(registry); |
| 1548 } | 1550 } |
| 1549 | 1551 |
| 1550 } // namespace chromeos | 1552 } // namespace chromeos |
| OLD | NEW |