| Index: chrome/browser/accessibility/accessibility_notifier.h
|
| diff --git a/chrome/browser/accessibility/accessibility_notifier.h b/chrome/browser/accessibility/accessibility_notifier.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..bbfeedae709b7e37f062dc3b182957c310b90b93
|
| --- /dev/null
|
| +++ b/chrome/browser/accessibility/accessibility_notifier.h
|
| @@ -0,0 +1,47 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROME_BROWSER_ACCESSIBILITY_ACCESSIBILITY_NOTIFIER_H_
|
| +#define CHROME_BROWSER_ACCESSIBILITY_ACCESSIBILITY_NOTIFIER_H_
|
| +
|
| +#include <string>
|
| +
|
| +#include "base/basictypes.h"
|
| +#include "base/compiler_specific.h"
|
| +#include "base/prefs/pref_change_registrar.h"
|
| +#include "components/keyed_service/core/keyed_service.h"
|
| +#include "content/public/browser/notification_observer.h"
|
| +#include "content/public/browser/notification_registrar.h"
|
| +
|
| +class Profile;
|
| +
|
| +// Observes a set of prefs in the login profile. If any of the prefs
|
| +// related to Accessibility is updated, the status is reported to callback.
|
| +class AccessibilityNotifier : public KeyedService {
|
| + public:
|
| + explicit AccessibilityNotifier(Profile* profile);
|
| + ~AccessibilityNotifier() override;
|
| +
|
| + // KeyedService:
|
| + void Shutdown() override;
|
| +
|
| + private:
|
| + enum AnimationPolicy {
|
| + ANIMATION_POLICY_ALLOWED,
|
| + ANIMATION_POLICY_ANIMATION_ONCE,
|
| + ANIMATION_POLICY_NO_ANIMATION
|
| + };
|
| +
|
| + void UpdateAnimationPolicyFromPref();
|
| + void SetProfile(Profile*);
|
| +
|
| + // Profile which has the current a11y context.
|
| + Profile* profile_;
|
| + AnimationPolicy animation_policy_;
|
| + content::NotificationRegistrar notification_registrar_;
|
| + scoped_ptr<PrefChangeRegistrar> pref_change_registrar_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(AccessibilityNotifier);
|
| +};
|
| +#endif // CHROME_BROWSER_ACCESSIBILITY_ACCESSIBILITY_NOTIFIER_H_
|
|
|