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

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

Issue 2663073004: Temporarily disable two-finger spoken feedback toggle. (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 if (cl->HasSwitch(kAshDisableSystemSounds)) 555 if (cl->HasSwitch(kAshDisableSystemSounds))
556 return false; 556 return false;
557 if (option == PlaySoundOption::SPOKEN_FEEDBACK_ENABLED && 557 if (option == PlaySoundOption::SPOKEN_FEEDBACK_ENABLED &&
558 !IsSpokenFeedbackEnabled() && !cl->HasSwitch(kAshEnableSystemSounds)) { 558 !IsSpokenFeedbackEnabled() && !cl->HasSwitch(kAshEnableSystemSounds)) {
559 return false; 559 return false;
560 } 560 }
561 return media::SoundsManager::Get()->Play(sound_key); 561 return media::SoundsManager::Get()->Play(sound_key);
562 } 562 }
563 563
564 bool AccessibilityManager::ShouldToggleSpokenFeedbackViaTouch() { 564 bool AccessibilityManager::ShouldToggleSpokenFeedbackViaTouch() {
565 #if 1
566 // Temporarily disabling this feature until UI feedback is fixed.
567 // http://crbug.com/662501
568 return false;
569 #else
David Tseng 2017/01/31 20:55:31 Why not just remove this block?
dmazzoni 2017/01/31 21:02:30 The CFM team is going to follow up with a patch to
565 policy::BrowserPolicyConnectorChromeOS* connector = 570 policy::BrowserPolicyConnectorChromeOS* connector =
566 g_browser_process->platform_part()->browser_policy_connector_chromeos(); 571 g_browser_process->platform_part()->browser_policy_connector_chromeos();
567 if (!connector) 572 if (!connector)
568 return false; 573 return false;
569 574
570 if (!connector->IsEnterpriseManaged()) 575 if (!connector->IsEnterpriseManaged())
571 return false; 576 return false;
572 577
573 const policy::DeviceCloudPolicyManagerChromeOS* const 578 const policy::DeviceCloudPolicyManagerChromeOS* const
574 device_cloud_policy_manager = connector->GetDeviceCloudPolicyManager(); 579 device_cloud_policy_manager = connector->GetDeviceCloudPolicyManager();
575 if (!device_cloud_policy_manager) 580 if (!device_cloud_policy_manager)
576 return false; 581 return false;
577 582
578 if (!device_cloud_policy_manager->IsRemoraRequisition()) 583 if (!device_cloud_policy_manager->IsRemoraRequisition())
579 return false; 584 return false;
580 585
581 KioskAppManager* manager = KioskAppManager::Get(); 586 KioskAppManager* manager = KioskAppManager::Get();
582 KioskAppManager::App app; 587 KioskAppManager::App app;
583 CHECK(manager->GetApp(manager->GetAutoLaunchApp(), &app)); 588 CHECK(manager->GetApp(manager->GetAutoLaunchApp(), &app));
584 return app.was_auto_launched_with_zero_delay; 589 return app.was_auto_launched_with_zero_delay;
590 #endif
585 } 591 }
586 592
587 bool AccessibilityManager::PlaySpokenFeedbackToggleCountdown(int tick_count) { 593 bool AccessibilityManager::PlaySpokenFeedbackToggleCountdown(int tick_count) {
588 return media::SoundsManager::Get()->Play( 594 return media::SoundsManager::Get()->Play(
589 tick_count % 2 ? SOUND_SPOKEN_FEEDBACK_TOGGLE_COUNTDOWN_HIGH 595 tick_count % 2 ? SOUND_SPOKEN_FEEDBACK_TOGGLE_COUNTDOWN_HIGH
590 : SOUND_SPOKEN_FEEDBACK_TOGGLE_COUNTDOWN_LOW); 596 : SOUND_SPOKEN_FEEDBACK_TOGGLE_COUNTDOWN_LOW);
591 } 597 }
592 598
593 void AccessibilityManager::HandleAccessibilityGesture(ui::AXGesture gesture) { 599 void AccessibilityManager::HandleAccessibilityGesture(ui::AXGesture gesture) {
594 extensions::EventRouter* event_router = 600 extensions::EventRouter* event_router =
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
1372 content::BrowserContext* context) { 1378 content::BrowserContext* context) {
1373 keyboard_listener_extension_id_ = id; 1379 keyboard_listener_extension_id_ = id;
1374 1380
1375 extensions::ExtensionRegistry* registry = 1381 extensions::ExtensionRegistry* registry =
1376 extensions::ExtensionRegistry::Get(context); 1382 extensions::ExtensionRegistry::Get(context);
1377 if (!extension_registry_observer_.IsObserving(registry) && !id.empty()) 1383 if (!extension_registry_observer_.IsObserving(registry) && !id.empty())
1378 extension_registry_observer_.Add(registry); 1384 extension_registry_observer_.Add(registry);
1379 } 1385 }
1380 1386
1381 } // namespace chromeos 1387 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698