| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_MESSAGE_CENTER_FAKE_NOTIFIER_SETTINGS_PROVIDER_H_ | 5 #ifndef UI_MESSAGE_CENTER_FAKE_NOTIFIER_SETTINGS_PROVIDER_H_ |
| 6 #define UI_MESSAGE_CENTER_FAKE_NOTIFIER_SETTINGS_PROVIDER_H_ | 6 #define UI_MESSAGE_CENTER_FAKE_NOTIFIER_SETTINGS_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include <memory> |
| 11 |
| 11 #include "ui/message_center/notifier_settings.h" | 12 #include "ui/message_center/notifier_settings.h" |
| 12 | 13 |
| 13 namespace message_center { | 14 namespace message_center { |
| 14 | 15 |
| 15 // A NotifierSettingsProvider that returns a configurable, fixed set of | 16 // A NotifierSettingsProvider that returns a configurable, fixed set of |
| 16 // notifiers and records which callbacks were called. For use in tests. | 17 // notifiers and records which callbacks were called. For use in tests. |
| 17 class FakeNotifierSettingsProvider : public NotifierSettingsProvider { | 18 class FakeNotifierSettingsProvider : public NotifierSettingsProvider { |
| 18 public: | 19 public: |
| 19 FakeNotifierSettingsProvider(); | 20 FakeNotifierSettingsProvider(); |
| 20 explicit FakeNotifierSettingsProvider( | 21 explicit FakeNotifierSettingsProvider( |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 58 |
| 58 NotifierGroupItem(); | 59 NotifierGroupItem(); |
| 59 NotifierGroupItem(const NotifierGroupItem& other); | 60 NotifierGroupItem(const NotifierGroupItem& other); |
| 60 ~NotifierGroupItem(); | 61 ~NotifierGroupItem(); |
| 61 }; | 62 }; |
| 62 | 63 |
| 63 std::map<const Notifier*, bool> enabled_; | 64 std::map<const Notifier*, bool> enabled_; |
| 64 std::vector<NotifierGroupItem> items_; | 65 std::vector<NotifierGroupItem> items_; |
| 65 int closed_called_count_; | 66 int closed_called_count_; |
| 66 size_t active_item_index_; | 67 size_t active_item_index_; |
| 67 scoped_ptr<NotifierId> notifier_id_with_settings_handler_; | 68 std::unique_ptr<NotifierId> notifier_id_with_settings_handler_; |
| 68 size_t notifier_settings_requested_count_; | 69 size_t notifier_settings_requested_count_; |
| 69 }; | 70 }; |
| 70 | 71 |
| 71 } // namespace message_center | 72 } // namespace message_center |
| 72 | 73 |
| 73 #endif // UI_MESSAGE_CENTER_FAKE_NOTIFIER_SETTINGS_PROVIDER_H_ | 74 #endif // UI_MESSAGE_CENTER_FAKE_NOTIFIER_SETTINGS_PROVIDER_H_ |
| OLD | NEW |