| 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> |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 #include "chrome/browser/profiles/profile.h" | 51 #include "chrome/browser/profiles/profile.h" |
| 52 #include "chrome/browser/profiles/profile_manager.h" | 52 #include "chrome/browser/profiles/profile_manager.h" |
| 53 #include "chrome/browser/ui/ash/ash_util.h" | 53 #include "chrome/browser/ui/ash/ash_util.h" |
| 54 #include "chrome/common/chrome_paths.h" | 54 #include "chrome/common/chrome_paths.h" |
| 55 #include "chrome/common/extensions/api/accessibility_private.h" | 55 #include "chrome/common/extensions/api/accessibility_private.h" |
| 56 #include "chrome/common/extensions/extension_constants.h" | 56 #include "chrome/common/extensions/extension_constants.h" |
| 57 #include "chrome/common/pref_names.h" | 57 #include "chrome/common/pref_names.h" |
| 58 #include "chrome/grit/browser_resources.h" | 58 #include "chrome/grit/browser_resources.h" |
| 59 #include "chromeos/audio/audio_a11y_controller.h" | 59 #include "chromeos/audio/audio_a11y_controller.h" |
| 60 #include "chromeos/audio/chromeos_sounds.h" | 60 #include "chromeos/audio/chromeos_sounds.h" |
| 61 #include "chromeos/dbus/dbus_thread_manager.h" |
| 62 #include "chromeos/dbus/power_manager_client.h" |
| 61 #include "components/prefs/pref_member.h" | 63 #include "components/prefs/pref_member.h" |
| 62 #include "components/prefs/pref_service.h" | 64 #include "components/prefs/pref_service.h" |
| 63 #include "content/public/browser/browser_accessibility_state.h" | 65 #include "content/public/browser/browser_accessibility_state.h" |
| 64 #include "content/public/browser/browser_thread.h" | 66 #include "content/public/browser/browser_thread.h" |
| 65 #include "content/public/browser/notification_details.h" | 67 #include "content/public/browser/notification_details.h" |
| 66 #include "content/public/browser/notification_service.h" | 68 #include "content/public/browser/notification_service.h" |
| 67 #include "content/public/browser/notification_source.h" | 69 #include "content/public/browser/notification_source.h" |
| 68 #include "content/public/browser/web_ui.h" | 70 #include "content/public/browser/web_ui.h" |
| 69 #include "content/public/common/content_switches.h" | 71 #include "content/public/common/content_switches.h" |
| 70 #include "content/public/common/service_manager_connection.h" | 72 #include "content/public/common/service_manager_connection.h" |
| (...skipping 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1354 PlayEarcon(SOUND_SPOKEN_FEEDBACK_DISABLED, PlaySoundOption::ALWAYS); | 1356 PlayEarcon(SOUND_SPOKEN_FEEDBACK_DISABLED, PlaySoundOption::ALWAYS); |
| 1355 // Clear the accessibility focus ring. | 1357 // Clear the accessibility focus ring. |
| 1356 AccessibilityFocusRingController::GetInstance()->SetFocusRing( | 1358 AccessibilityFocusRingController::GetInstance()->SetFocusRing( |
| 1357 std::vector<gfx::Rect>(), | 1359 std::vector<gfx::Rect>(), |
| 1358 AccessibilityFocusRingController::PERSIST_FOCUS_RING); | 1360 AccessibilityFocusRingController::PERSIST_FOCUS_RING); |
| 1359 | 1361 |
| 1360 if (chromevox_panel_) { | 1362 if (chromevox_panel_) { |
| 1361 chromevox_panel_->Close(); | 1363 chromevox_panel_->Close(); |
| 1362 chromevox_panel_ = nullptr; | 1364 chromevox_panel_ = nullptr; |
| 1363 } | 1365 } |
| 1366 |
| 1367 // In case the user darkened the screen, undarken it now. |
| 1368 chromeos::DBusThreadManager::Get() |
| 1369 ->GetPowerManagerClient() |
| 1370 ->SetBacklightsForcedOff(false); |
| 1364 } | 1371 } |
| 1365 | 1372 |
| 1366 void AccessibilityManager::PostSwitchChromeVoxProfile() { | 1373 void AccessibilityManager::PostSwitchChromeVoxProfile() { |
| 1367 if (chromevox_panel_) { | 1374 if (chromevox_panel_) { |
| 1368 chromevox_panel_->Close(); | 1375 chromevox_panel_->Close(); |
| 1369 chromevox_panel_ = nullptr; | 1376 chromevox_panel_ = nullptr; |
| 1370 } | 1377 } |
| 1371 chromevox_panel_ = new ChromeVoxPanel(profile_); | 1378 chromevox_panel_ = new ChromeVoxPanel(profile_); |
| 1372 chromevox_panel_widget_observer_.reset( | 1379 chromevox_panel_widget_observer_.reset( |
| 1373 new ChromeVoxPanelWidgetObserver(chromevox_panel_->GetWidget(), this)); | 1380 new ChromeVoxPanelWidgetObserver(chromevox_panel_->GetWidget(), this)); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1398 content::BrowserContext* context) { | 1405 content::BrowserContext* context) { |
| 1399 keyboard_listener_extension_id_ = id; | 1406 keyboard_listener_extension_id_ = id; |
| 1400 | 1407 |
| 1401 extensions::ExtensionRegistry* registry = | 1408 extensions::ExtensionRegistry* registry = |
| 1402 extensions::ExtensionRegistry::Get(context); | 1409 extensions::ExtensionRegistry::Get(context); |
| 1403 if (!extension_registry_observer_.IsObserving(registry) && !id.empty()) | 1410 if (!extension_registry_observer_.IsObserving(registry) && !id.empty()) |
| 1404 extension_registry_observer_.Add(registry); | 1411 extension_registry_observer_.Add(registry); |
| 1405 } | 1412 } |
| 1406 | 1413 |
| 1407 } // namespace chromeos | 1414 } // namespace chromeos |
| OLD | NEW |