OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 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_ACCESSIBILITY_ACCESSIBILITY_NOTIFIER_H_ | |
6 #define CHROME_BROWSER_ACCESSIBILITY_ACCESSIBILITY_NOTIFIER_H_ | |
7 | |
8 #include "base/basictypes.h" | |
9 #include "base/compiler_specific.h" | |
10 #include "base/prefs/pref_change_registrar.h" | |
11 #include "components/keyed_service/core/keyed_service.h" | |
12 #include "content/public/browser/notification_observer.h" | |
13 #include "content/public/browser/notification_registrar.h" | |
14 | |
15 class Profile; | |
16 | |
17 // Observes a set of prefs in the login profile. If any of the prefs | |
18 // related to Accessibility is updated, the status is reported to callback. | |
19 class AccessibilityNotifier : public KeyedService { | |
20 public: | |
21 explicit AccessibilityNotifier(Profile* profile); | |
22 ~AccessibilityNotifier() override; | |
23 | |
24 // KeyedService: | |
25 void Shutdown() override; | |
26 | |
27 private: | |
28 enum AnimationPolicy { | |
Lei Zhang
2015/01/28 19:38:43
Can't you just reuse content::ImageAnimationPolicy
| |
29 ANIMATION_POLICY_ALLOWED, | |
30 ANIMATION_POLICY_ANIMATION_ONCE, | |
31 ANIMATION_POLICY_NO_ANIMATION | |
32 }; | |
33 | |
34 void UpdateAnimationPolicyFromPref(); | |
35 void SetProfile(Profile*); | |
Lei Zhang
2015/01/28 19:38:43
nit: we generally include the parameter name
| |
36 | |
37 // Profile which has the current a11y context. | |
38 Profile* profile_; | |
39 AnimationPolicy animation_policy_; | |
40 content::NotificationRegistrar notification_registrar_; | |
41 scoped_ptr<PrefChangeRegistrar> pref_change_registrar_; | |
42 | |
43 DISALLOW_COPY_AND_ASSIGN(AccessibilityNotifier); | |
44 }; | |
45 #endif // CHROME_BROWSER_ACCESSIBILITY_ACCESSIBILITY_NOTIFIER_H_ | |
OLD | NEW |