Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(525)

Side by Side Diff: chrome/browser/safe_browsing/srt_prompt_controller.h

Issue 2848683002: Chrome Cleaner UI: Rename SRT to ChromeCleaner (Closed)
Patch Set: Rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_SAFE_BROWSING_SRT_PROMPT_CONTROLLER_H_
6 #define CHROME_BROWSER_SAFE_BROWSING_SRT_PROMPT_CONTROLLER_H_
7
8 #include <vector>
9
10 #include "base/macros.h"
11 #include "base/strings/string16.h"
12
13 namespace safe_browsing {
14
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
17 // be called by the UI in response to user actions.
18 //
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
21 // called.
22 class SRTPromptController {
23 public:
24 SRTPromptController();
25
26 base::string16 GetWindowTitle() const;
27 base::string16 GetMainText() const;
28 base::string16 GetAcceptButtonLabel() const;
29 base::string16 GetAdvancedButtonLabel() const;
30
31 // Called by the Cleaner dialog when the dialog has been shown. Used for
32 // reporting metrics.
33 void DialogShown();
34 // Called by the Cleaner dialog when user accepts the prompt. Once |Accept()|
35 // has been called, the controller will eventually delete itself and no member
36 // functions should be called after that.
37 void Accept();
38 // Called by the Cleaner dialog when the dialog is closed via the cancel
39 // button. Once |Cancel()| has been called, the controller will eventually
40 // delete itself and no member functions should be called after that.
41 void Cancel();
42 // Called by the Cleaner dialog when the dialog is closed by some other means
43 // than the cancel button (for example, by pressing Esc or clicking the 'x' on
44 // the top of the dialog). After a call to |Dismiss()|, the controller will
45 // eventually delete itself and no member functions should be called after
46 // that.
47 void Close();
48 // Called when the advanced button is clicked, after which the dialog will
49 // close. After a call to |AdvancedButtonClicked()|, the controller will
50 // eventually delete itself and no member functions should be called after
51 // that.
52 void AdvancedButtonClicked();
53
54 protected:
55 ~SRTPromptController();
56
57 private:
58 void OnInteractionDone();
59
60 DISALLOW_COPY_AND_ASSIGN(SRTPromptController);
61 };
62
63 } // namespace safe_browsing
64
65 #endif // CHROME_BROWSER_SAFE_BROWSING_SRT_PROMPT_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698