Stop passing the OOBE WebUI object to AccessibilityManager
commit681d053f56e8811feebe868953722617e0ea1377
authorbartfab@chromium.org <bartfab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Tue, 11 Jun 2013 12:52:50 +0000 (11 12:52 +0000)
committerbartfab@chromium.org <bartfab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Tue, 11 Jun 2013 12:52:50 +0000 (11 12:52 +0000)
tree98d5f1fe8ace03e4f81107da0869186798839887
parent314231525aea6fa7480cff1f3adccfbe6f5f960d
Stop passing the OOBE WebUI object to AccessibilityManager

When enabling spoken feedback on an OOBE screen, ChromeVox needs to be
injected into the screen's WebUI. The AccessibilityManager expects the
caller to determine whether an OOBE screen is being shown and if so, to
pass in a pointer to its WebUI.

This has led to many different code paths trying to determine the OOBE
WebUI, all doing it slightly differently. Many code paths do not even try
at all, passing in NULL unconditionally.

This CL moves the logic that determines whether an OOBE screen is being
shown into the AccessibilityManager, removing the need to pass a WebUI
object to it.

BUG=225956
TEST=browser and unit tests updated + manual in VM

TBR=jam (testing_automation_provider_chromeos.cc)
TBR=nkostylev (tray_accessibility_browsertest.cc + core_oobe_handler.cc)
TBR=derat (chrome_shell_delegate_chromeos.cc)

Review URL: https://chromiumcodereview.appspot.com/16570002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205516 0039d316-1c4b-4281-b951-d872f2087c98
chrome/browser/automation/testing_automation_provider_chromeos.cc
chrome/browser/chromeos/accessibility/accessibility_manager.cc
chrome/browser/chromeos/accessibility/accessibility_manager.h
chrome/browser/chromeos/accessibility/accessibility_manager_browsertest.cc
chrome/browser/chromeos/system/tray_accessibility_browsertest.cc
chrome/browser/policy/policy_browsertest.cc
chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc
chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc