| 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 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 if (cl->HasSwitch(kAshDisableSystemSounds)) | 550 if (cl->HasSwitch(kAshDisableSystemSounds)) |
| 551 return false; | 551 return false; |
| 552 if (option == PlaySoundOption::SPOKEN_FEEDBACK_ENABLED && | 552 if (option == PlaySoundOption::SPOKEN_FEEDBACK_ENABLED && |
| 553 !IsSpokenFeedbackEnabled() && !cl->HasSwitch(kAshEnableSystemSounds)) { | 553 !IsSpokenFeedbackEnabled() && !cl->HasSwitch(kAshEnableSystemSounds)) { |
| 554 return false; | 554 return false; |
| 555 } | 555 } |
| 556 return media::SoundsManager::Get()->Play(sound_key); | 556 return media::SoundsManager::Get()->Play(sound_key); |
| 557 } | 557 } |
| 558 | 558 |
| 559 bool AccessibilityManager::ShouldToggleSpokenFeedbackViaTouch() { | 559 bool AccessibilityManager::ShouldToggleSpokenFeedbackViaTouch() { |
| 560 #if 1 |
| 561 // Temporarily disabling this feature until UI feedback is fixed. |
| 562 // http://crbug.com/662501 |
| 563 return false; |
| 564 #else |
| 560 policy::BrowserPolicyConnectorChromeOS* connector = | 565 policy::BrowserPolicyConnectorChromeOS* connector = |
| 561 g_browser_process->platform_part()->browser_policy_connector_chromeos(); | 566 g_browser_process->platform_part()->browser_policy_connector_chromeos(); |
| 562 if (!connector) | 567 if (!connector) |
| 563 return false; | 568 return false; |
| 564 | 569 |
| 565 if (!connector->IsEnterpriseManaged()) | 570 if (!connector->IsEnterpriseManaged()) |
| 566 return false; | 571 return false; |
| 567 | 572 |
| 568 const policy::DeviceCloudPolicyManagerChromeOS* const | 573 const policy::DeviceCloudPolicyManagerChromeOS* const |
| 569 device_cloud_policy_manager = connector->GetDeviceCloudPolicyManager(); | 574 device_cloud_policy_manager = connector->GetDeviceCloudPolicyManager(); |
| 570 if (!device_cloud_policy_manager) | 575 if (!device_cloud_policy_manager) |
| 571 return false; | 576 return false; |
| 572 | 577 |
| 573 if (!device_cloud_policy_manager->IsRemoraRequisition()) | 578 if (!device_cloud_policy_manager->IsRemoraRequisition()) |
| 574 return false; | 579 return false; |
| 575 | 580 |
| 576 KioskAppManager* manager = KioskAppManager::Get(); | 581 KioskAppManager* manager = KioskAppManager::Get(); |
| 577 KioskAppManager::App app; | 582 KioskAppManager::App app; |
| 578 CHECK(manager->GetApp(manager->GetAutoLaunchApp(), &app)); | 583 CHECK(manager->GetApp(manager->GetAutoLaunchApp(), &app)); |
| 579 return app.was_auto_launched_with_zero_delay; | 584 return app.was_auto_launched_with_zero_delay; |
| 585 #endif |
| 580 } | 586 } |
| 581 | 587 |
| 582 bool AccessibilityManager::PlaySpokenFeedbackToggleCountdown(int tick_count) { | 588 bool AccessibilityManager::PlaySpokenFeedbackToggleCountdown(int tick_count) { |
| 583 return media::SoundsManager::Get()->Play( | 589 return media::SoundsManager::Get()->Play( |
| 584 tick_count % 2 ? SOUND_SPOKEN_FEEDBACK_TOGGLE_COUNTDOWN_HIGH | 590 tick_count % 2 ? SOUND_SPOKEN_FEEDBACK_TOGGLE_COUNTDOWN_HIGH |
| 585 : SOUND_SPOKEN_FEEDBACK_TOGGLE_COUNTDOWN_LOW); | 591 : SOUND_SPOKEN_FEEDBACK_TOGGLE_COUNTDOWN_LOW); |
| 586 } | 592 } |
| 587 | 593 |
| 588 void AccessibilityManager::HandleAccessibilityGesture(ui::AXGesture gesture) { | 594 void AccessibilityManager::HandleAccessibilityGesture(ui::AXGesture gesture) { |
| 589 extensions::EventRouter* event_router = | 595 extensions::EventRouter* event_router = |
| (...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1367 content::BrowserContext* context) { | 1373 content::BrowserContext* context) { |
| 1368 keyboard_listener_extension_id_ = id; | 1374 keyboard_listener_extension_id_ = id; |
| 1369 | 1375 |
| 1370 extensions::ExtensionRegistry* registry = | 1376 extensions::ExtensionRegistry* registry = |
| 1371 extensions::ExtensionRegistry::Get(context); | 1377 extensions::ExtensionRegistry::Get(context); |
| 1372 if (!extension_registry_observer_.IsObserving(registry) && !id.empty()) | 1378 if (!extension_registry_observer_.IsObserving(registry) && !id.empty()) |
| 1373 extension_registry_observer_.Add(registry); | 1379 extension_registry_observer_.Add(registry); |
| 1374 } | 1380 } |
| 1375 | 1381 |
| 1376 } // namespace chromeos | 1382 } // namespace chromeos |
| OLD | NEW |