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

Side by Side Diff: chrome/browser/chromeos/login/wizard_accessibility_helper.h

Issue 3159028: Add code to initialize accessibility for UI in the ChromeOS startup wizard. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 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 | Annotate | Revision Log
Property Changes:
Name: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_ACCESSIBILITY_HELPER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_ACCESSIBILITY_HELPER_H_
7 #pragma once
8
9 #include "base/keyboard_codes.h"
10 #include "base/scoped_ptr.h"
11 #include "base/singleton.h"
12 #include "chrome/browser/chromeos/login/wizard_accessibility_handler.h"
13 #include "chrome/browser/views/accessible_view_helper.h"
14 #include "chrome/common/notification_registrar.h"
15
16 class Profile;
17 namespace views {
18 class View;
19 }
20
21 // Class that provides convenience methods to enable accessibility for a
22 // specified View.
23 class WizardAccessibilityHelper {
24 public:
25 // Get Singleton instance of WizardAccessibilityHelper.
26 static WizardAccessibilityHelper* GetInstance();
27
28 // Enables Accessibility by setting the accessibility pref and
29 // registering the specified view_tree to raise UI notifications.
30 void EnableAccessibility(views::View* view_tree, Profile* profile);
31
32 // Enabled accessibility for the specified view_tree if the
33 // accessibility pref is already set.
34 void MaybeEnableAccessibility(views::View* view_tree, Profile* profile);
35
36 // Keyboard accelerator key to enable accessibility.
37 static const base::KeyboardCode accelerator = base::VKEY_Z;
38
39 private:
40 friend struct DefaultSingletonTraits<WizardAccessibilityHelper>;
41 WizardAccessibilityHelper();
42 ~WizardAccessibilityHelper() {}
43
44 scoped_ptr<AccessibleViewHelper> accessible_view_helper_;
45
46 scoped_ptr<WizardAccessibilityHandler> accessibility_handler_;
47
48 // Used for tracking registrations to accessibility notifications.
49 NotificationRegistrar registrar_;
50
51 DISALLOW_COPY_AND_ASSIGN(WizardAccessibilityHelper);
52 };
53
54 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_ACCESSIBILITY_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698