gpu: Tweak Android WebGL test expectations
[chromium-blink-merge.git] / ui / message_center / fake_notifier_settings_provider.h
blob85348f75924c998184e92b813e9d26a1c86ef212
1 // Copyright (c) 2013 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.
5 #ifndef UI_MESSAGE_CENTER_FAKE_NOTIFIER_SETTINGS_PROVIDER_H_
6 #define UI_MESSAGE_CENTER_FAKE_NOTIFIER_SETTINGS_PROVIDER_H_
8 #include "ui/message_center/notifier_settings.h"
10 namespace message_center {
12 // A NotifierSettingsProvider that returns a configurable, fixed set of
13 // notifiers and records which callbacks were called. For use in tests.
14 class FakeNotifierSettingsProvider : public NotifierSettingsProvider {
15 public:
16 FakeNotifierSettingsProvider();
17 FakeNotifierSettingsProvider(const std::vector<Notifier*>& notifiers);
18 virtual ~FakeNotifierSettingsProvider();
20 virtual size_t GetNotifierGroupCount() const OVERRIDE;
21 virtual const message_center::NotifierGroup& GetNotifierGroupAt(
22 size_t index) const OVERRIDE;
23 virtual bool IsNotifierGroupActiveAt(size_t index) const OVERRIDE;
24 virtual void SwitchToNotifierGroup(size_t index) OVERRIDE;
25 virtual const message_center::NotifierGroup& GetActiveNotifierGroup() const
26 OVERRIDE;
28 virtual void GetNotifierList(std::vector<Notifier*>* notifiers) OVERRIDE;
30 virtual void SetNotifierEnabled(const Notifier& notifier,
31 bool enabled) OVERRIDE;
33 virtual void OnNotifierSettingsClosing() OVERRIDE;
34 virtual void AddObserver(NotifierSettingsObserver* observer) OVERRIDE;
35 virtual void RemoveObserver(NotifierSettingsObserver* observer) OVERRIDE;
37 bool WasEnabled(const Notifier& notifier);
38 int closed_called_count();
40 void AddGroup(NotifierGroup* group, const std::vector<Notifier*>& notifiers);
42 private:
43 struct NotifierGroupItem {
44 NotifierGroup* group;
45 std::vector<Notifier*> notifiers;
47 NotifierGroupItem();
48 ~NotifierGroupItem();
51 std::map<const Notifier*, bool> enabled_;
52 std::vector<NotifierGroupItem> items_;
53 int closed_called_count_;
54 size_t active_item_index_;
57 } // namespace message_center
59 #endif // UI_MESSAGE_CENTER_FAKE_NOTIFIER_SETTINGS_PROVIDER_H_