| Index: chrome/browser/safe_browsing/srt_prompt_controller.h
|
| diff --git a/chrome/browser/safe_browsing/srt_prompt_controller.h b/chrome/browser/safe_browsing/srt_prompt_controller.h
|
| index 3546491c10c19d6a22ba0dce93d9ef74bc432acf..81dca5b2e21a34dfb978508bedd22216c050b16d 100644
|
| --- a/chrome/browser/safe_browsing/srt_prompt_controller.h
|
| +++ b/chrome/browser/safe_browsing/srt_prompt_controller.h
|
| @@ -16,57 +16,40 @@ namespace safe_browsing {
|
| // UI. Also provides functions, such as |Accept()| and |Cancel()|, that should
|
| // be called by the UI in response to user actions.
|
| //
|
| -// Objects of this class are typically created by the SwReporterProcess class,
|
| -// which will pass in information the controller needs to be able to create
|
| -// strings to be displayed in the prompt dialog.
|
| -//
|
| // This class manages its own lifetime and will delete itself once the Cleaner
|
| // dialog has been dismissed and either of |Accept()| or |Cancel()| have been
|
| // called.
|
| class SRTPromptController {
|
| public:
|
| - struct LabelInfo {
|
| - enum LabelType {
|
| - // Indicates that |text| should be displayed as a multi-line label.
|
| - PARAGRAPH,
|
| - // Indicates that |text| should be displayed as a multi-line label that is
|
| - // indented and starts with a bullet point.
|
| - BULLET_ITEM,
|
| - };
|
| -
|
| - LabelInfo(LabelType type, const base::string16& text);
|
| - ~LabelInfo();
|
| -
|
| - LabelType type;
|
| - base::string16 text;
|
| - };
|
| -
|
| SRTPromptController();
|
|
|
| base::string16 GetWindowTitle() const;
|
| - // The text to be shown in the Cleaner dialog's main section and will
|
| - // always be visible while the dialog is displayed.
|
| - std::vector<LabelInfo> GetMainText() const;
|
| - // The text to be shown in the expandable details section of the
|
| - // Cleaner dialog.
|
| - std::vector<LabelInfo> GetDetailsText() const;
|
| - // The text on the button that expands the details section.
|
| - base::string16 GetShowDetailsLabel() const;
|
| - // The text on the button that folds the details section.
|
| - base::string16 GetHideDetailsLabel() const;
|
| + base::string16 GetMainText() const;
|
| base::string16 GetAcceptButtonLabel() const;
|
| + base::string16 GetAdvancedButtonLabel() const;
|
|
|
| // Called by the Cleaner dialog when the dialog has been shown. Used for
|
| // reporting metrics.
|
| void DialogShown();
|
| // Called by the Cleaner dialog when user accepts the prompt. Once |Accept()|
|
| - // has been called, the controller will eventually delete itself and so no
|
| - // member functions should be called after that.
|
| + // has been called, the controller will eventually delete itself and no member
|
| + // functions should be called after that.
|
| void Accept();
|
| - // Called by the Cleaner dialog when the dialog is dismissed or canceled. Once
|
| - // |Cancel()| has been called, the controller will eventually delete itself
|
| - // and so no member functions should be called after that.
|
| + // Called by the Cleaner dialog when the dialog is closed via the cancel
|
| + // button. Once |Cancel()| has been called, the controller will eventually
|
| + // delete itself and no member functions should be called after that.
|
| void Cancel();
|
| + // Called by the Cleaner dialog when the dialog is closed by some other means
|
| + // than the cancel button (for example, by pressing Esc or clicking the 'x' on
|
| + // the top of the dialog). After a call to |Dismiss()|, the controller will
|
| + // eventually delete itself and no member functions should be called after
|
| + // that.
|
| + void Close();
|
| + // Called when the advanced button is clicked, after which the dialog will
|
| + // close. After a call to |AdvancedButtonClicked()|, the controller will
|
| + // eventually delete itself and no member functions should be called after
|
| + // that.
|
| + void AdvancedButtonClicked();
|
|
|
| protected:
|
| ~SRTPromptController();
|
|
|