OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_SAFE_BROWSING_SRT_PROMPT_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_DIALOG_CONTROLLER_H_ |
6 #define CHROME_BROWSER_SAFE_BROWSING_SRT_PROMPT_CONTROLLER_H_ | 6 #define CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_DIALOG_CONTROLLER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
12 | 12 |
13 namespace safe_browsing { | 13 namespace safe_browsing { |
14 | 14 |
15 // Provides the various elements that will be displayed in the Chrome Cleaner | 15 // Provides the various elements that will be displayed in the Chrome Cleaner |
16 // UI. Also provides functions, such as |Accept()| and |Cancel()|, that should | 16 // UI. Also provides functions, such as |Accept()| and |Cancel()|, that should |
17 // be called by the UI in response to user actions. | 17 // be called by the UI in response to user actions. |
18 // | 18 // |
19 // This class manages its own lifetime and will delete itself once the Cleaner | 19 // This class manages its own lifetime and will delete itself once the Cleaner |
20 // dialog has been dismissed and either of |Accept()| or |Cancel()| have been | 20 // dialog has been dismissed and either of |Accept()| or |Cancel()| have been |
21 // called. | 21 // called. |
22 class SRTPromptController { | 22 class ChromeCleanerDialogController { |
23 public: | 23 public: |
24 SRTPromptController(); | 24 ChromeCleanerDialogController(); |
25 | 25 |
26 base::string16 GetWindowTitle() const; | 26 base::string16 GetWindowTitle() const; |
27 base::string16 GetMainText() const; | 27 base::string16 GetMainText() const; |
28 base::string16 GetAcceptButtonLabel() const; | 28 base::string16 GetAcceptButtonLabel() const; |
29 base::string16 GetAdvancedButtonLabel() const; | 29 base::string16 GetAdvancedButtonLabel() const; |
30 | 30 |
31 // Called by the Cleaner dialog when the dialog has been shown. Used for | 31 // Called by the Cleaner dialog when the dialog has been shown. Used for |
32 // reporting metrics. | 32 // reporting metrics. |
33 void DialogShown(); | 33 void DialogShown(); |
34 // Called by the Cleaner dialog when user accepts the prompt. Once |Accept()| | 34 // Called by the Cleaner dialog when user accepts the prompt. Once |Accept()| |
(...skipping 10 matching lines...) Expand all Loading... |
45 // eventually delete itself and no member functions should be called after | 45 // eventually delete itself and no member functions should be called after |
46 // that. | 46 // that. |
47 void Close(); | 47 void Close(); |
48 // Called when the advanced button is clicked, after which the dialog will | 48 // Called when the advanced button is clicked, after which the dialog will |
49 // close. After a call to |AdvancedButtonClicked()|, the controller will | 49 // close. After a call to |AdvancedButtonClicked()|, the controller will |
50 // eventually delete itself and no member functions should be called after | 50 // eventually delete itself and no member functions should be called after |
51 // that. | 51 // that. |
52 void AdvancedButtonClicked(); | 52 void AdvancedButtonClicked(); |
53 | 53 |
54 protected: | 54 protected: |
55 ~SRTPromptController(); | 55 ~ChromeCleanerDialogController(); |
56 | 56 |
57 private: | 57 private: |
58 void OnInteractionDone(); | 58 void OnInteractionDone(); |
59 | 59 |
60 DISALLOW_COPY_AND_ASSIGN(SRTPromptController); | 60 DISALLOW_COPY_AND_ASSIGN(ChromeCleanerDialogController); |
61 }; | 61 }; |
62 | 62 |
63 } // namespace safe_browsing | 63 } // namespace safe_browsing |
64 | 64 |
65 #endif // CHROME_BROWSER_SAFE_BROWSING_SRT_PROMPT_CONTROLLER_H_ | 65 #endif // CHROME_BROWSER_SAFE_BROWSING_CHROME_CLEANER_DIALOG_CONTROLLER_H_ |
OLD | NEW |