OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SETTINGS_CHANGE_GLOBAL_ERROR_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_PROTECTOR_SETTINGS_CHANGE_GLOBAL_ERROR_DELEGATE_H_ |
6 #define CHROME_BROWSER_PROTECTOR_SETTINGS_CHANGE_GLOBAL_ERROR_DELEGATE_H_ | 6 #define CHROME_BROWSER_PROTECTOR_SETTINGS_CHANGE_GLOBAL_ERROR_DELEGATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 | 10 |
11 class Browser; | 11 class Browser; |
12 | 12 |
13 namespace protector { | 13 namespace protector { |
14 | 14 |
| 15 class SettingsChangeGlobalError; |
| 16 |
15 // Interface for notifications about settings change error bubble closing. | 17 // Interface for notifications about settings change error bubble closing. |
16 class SettingsChangeGlobalErrorDelegate { | 18 class SettingsChangeGlobalErrorDelegate { |
17 public: | 19 public: |
18 virtual ~SettingsChangeGlobalErrorDelegate() {} | 20 virtual ~SettingsChangeGlobalErrorDelegate() {} |
19 | 21 |
20 // Called if user clicks "Apply change" button. | 22 // Called if user clicks "Apply change" button. |
21 virtual void OnApplyChange(Browser* browser) = 0; | 23 virtual void OnApplyChange(SettingsChangeGlobalError* error, |
| 24 Browser* browser) = 0; |
22 | 25 |
23 // Called if user clicks "Discard change" button. | 26 // Called if user clicks "Discard change" button. |
24 virtual void OnDiscardChange(Browser* browser) = 0; | 27 virtual void OnDiscardChange(SettingsChangeGlobalError* error, |
| 28 Browser* browser) = 0; |
25 | 29 |
26 // Called if user clicked outside the bubble and timeout for its reshow | 30 // Called if user clicked outside the bubble and timeout for its reshow |
27 // has passed. | 31 // has passed. |
28 virtual void OnDecisionTimeout() = 0; | 32 virtual void OnDecisionTimeout(SettingsChangeGlobalError* error) = 0; |
29 | 33 |
30 // Called when error is removed from profile so it's safe to delete it. | 34 // Called when error is removed from profile so it's safe to delete it. |
31 virtual void OnRemovedFromProfile() = 0; | 35 virtual void OnRemovedFromProfile(SettingsChangeGlobalError* error) = 0; |
32 }; | 36 }; |
33 | 37 |
34 } // namespace protector | 38 } // namespace protector |
35 | 39 |
36 #endif // CHROME_BROWSER_PROTECTOR_SETTINGS_CHANGE_GLOBAL_ERROR_DELEGATE_H_ | 40 #endif // CHROME_BROWSER_PROTECTOR_SETTINGS_CHANGE_GLOBAL_ERROR_DELEGATE_H_ |
OLD | NEW |