OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_PROTECTOR_BASE_SETTING_CHANGE_H_ | 5 #ifndef CHROME_BROWSER_PROTECTOR_BASE_SETTING_CHANGE_H_ |
6 #define CHROME_BROWSER_PROTECTOR_BASE_SETTING_CHANGE_H_ | 6 #define CHROME_BROWSER_PROTECTOR_BASE_SETTING_CHANGE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 20 matching lines...) Expand all Loading... |
31 // Associates this change with |protector_| instance so overrides must | 31 // Associates this change with |protector_| instance so overrides must |
32 // call the base method. | 32 // call the base method. |
33 virtual bool Init(Protector* protector); | 33 virtual bool Init(Protector* protector); |
34 | 34 |
35 // Persists new setting if needed. | 35 // Persists new setting if needed. |
36 virtual void Apply(); | 36 virtual void Apply(); |
37 | 37 |
38 // Restores old setting if needed. | 38 // Restores old setting if needed. |
39 virtual void Discard(); | 39 virtual void Discard(); |
40 | 40 |
| 41 // Indicates that user has ignored this change and timeout has passed. |
| 42 virtual void Timeout(); |
| 43 |
41 // Called before the change is removed from the protector instance. | 44 // Called before the change is removed from the protector instance. |
42 virtual void OnBeforeRemoved() = 0; | 45 virtual void OnBeforeRemoved() = 0; |
43 | 46 |
44 // Returns the wrench menu item and bubble title. | 47 // Returns the wrench menu item and bubble title. |
45 virtual string16 GetBubbleTitle() const = 0; | 48 virtual string16 GetBubbleTitle() const = 0; |
46 | 49 |
47 // Returns the bubble message text. | 50 // Returns the bubble message text. |
48 virtual string16 GetBubbleMessage() const = 0; | 51 virtual string16 GetBubbleMessage() const = 0; |
49 | 52 |
50 // Returns text for the button to apply the change with |Apply|. | 53 // Returns text for the button to apply the change with |Apply|. |
(...skipping 18 matching lines...) Expand all Loading... |
69 // Allocates and initializes SettingChange implementation for default search | 72 // Allocates and initializes SettingChange implementation for default search |
70 // provider setting. Both |actual| and |backup| may be NULL if corresponding | 73 // provider setting. Both |actual| and |backup| may be NULL if corresponding |
71 // values are unknown or invalid. | 74 // values are unknown or invalid. |
72 BaseSettingChange* CreateDefaultSearchProviderChange( | 75 BaseSettingChange* CreateDefaultSearchProviderChange( |
73 const TemplateURL* actual, | 76 const TemplateURL* actual, |
74 const TemplateURL* backup); | 77 const TemplateURL* backup); |
75 | 78 |
76 } // namespace protector | 79 } // namespace protector |
77 | 80 |
78 #endif // CHROME_BROWSER_PROTECTOR_BASE_SETTING_CHANGE_H_ | 81 #endif // CHROME_BROWSER_PROTECTOR_BASE_SETTING_CHANGE_H_ |
OLD | NEW |