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

Unified Diff: chrome/browser/ui/views/accessibility_event_router_views.h

Issue 6961027: Change event routers from singletons to being owned by the ExtensionService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: all is built on sand Created 9 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/accessibility_event_router_views.h
diff --git a/chrome/browser/ui/views/accessibility_event_router_views.h b/chrome/browser/ui/views/accessibility_event_router_views.h
index 44908bda7475b102c0af3949d0a793d882e8a8ba..7039a8b2364691c3405e2a89719e7f999b2257d1 100644
--- a/chrome/browser/ui/views/accessibility_event_router_views.h
+++ b/chrome/browser/ui/views/accessibility_event_router_views.h
@@ -73,6 +73,8 @@ class AccessibilityEventRouterViews {
FRIEND_TEST_ALL_PREFIXES(AccessibilityEventRouterViewsTest,
TestFocusNotification);
+ bool IsAccessibilityEnabled(Profile* profile);
+
// Checks the type of the view and calls one of the more specific
// Send*Notification methods, below.
void DispatchAccessibilityNotification(
@@ -111,6 +113,11 @@ class AccessibilityEventRouterViews {
void RecursiveGetMenuItemIndexAndCount(
views::View* menu, views::View* item, int* index, int* count);
+ // Used for testing only. Overrides the accessibility enabled setting
+ // so the test doesn't depend directly on the ExtensionService and
+ // ExtensionAccessibilityEventRouter.
+ void SetAccessibilityEnabledForTesting(bool enabled);
+
// The profile associated with the most recent window event - used to
// figure out where to route a few events that can't be directly traced
// to a window with a profile (like menu events).
@@ -119,6 +126,10 @@ class AccessibilityEventRouterViews {
// Used to defer handling of some events until the next time
// through the event loop.
ScopedRunnableMethodFactory<AccessibilityEventRouterViews> method_factory_;
+
+ // Used for testing only, with SetAccessibilityEnabledForTesting.
+ bool accessibility_enabled_overridden_for_testing_;
+ bool accessibility_enabled_override_value_;
};
#endif // CHROME_BROWSER_UI_VIEWS_ACCESSIBILITY_EVENT_ROUTER_VIEWS_H_
« no previous file with comments | « chrome/browser/extensions/extension_webnavigation_api.cc ('k') | chrome/browser/ui/views/accessibility_event_router_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698