Chromium Code Reviews| 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_SRT_PROMPT_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_SAFE_BROWSING_SRT_PROMPT_CONTROLLER_H_ | 6 #define CHROME_BROWSER_SAFE_BROWSING_SRT_PROMPT_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 class Browser; | |
| 14 | |
| 13 namespace safe_browsing { | 15 namespace safe_browsing { |
| 14 | 16 |
| 15 // Provides the various elements that will be displayed in the Chrome Cleaner | 17 // Provides the various elements that will be displayed in the Chrome Cleaner |
| 16 // UI. Also provides functions, such as |Accept()| and |Cancel()|, that should | 18 // UI. Also provides functions, such as |Accept()| and |Cancel()|, that should |
| 17 // be called by the UI in response to user actions. | 19 // be called by the UI in response to user actions. |
| 18 // | 20 // |
| 19 // Objects of this class are typically created by the SwReporterProcess class, | 21 // Objects of this class are typically created by the SwReporterProcess class, |
| 20 // which will pass in information the controller needs to be able to create | 22 // which will pass in information the controller needs to be able to create |
| 21 // strings to be displayed in the prompt dialog. | 23 // strings to be displayed in the prompt dialog. |
| 22 // | 24 // |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 36 | 38 |
| 37 LabelInfo(LabelType type, const base::string16& text); | 39 LabelInfo(LabelType type, const base::string16& text); |
| 38 ~LabelInfo(); | 40 ~LabelInfo(); |
| 39 | 41 |
| 40 LabelType type; | 42 LabelType type; |
| 41 base::string16 text; | 43 base::string16 text; |
| 42 }; | 44 }; |
| 43 | 45 |
| 44 SRTPromptController(); | 46 SRTPromptController(); |
| 45 | 47 |
| 48 static void ShowSRTPrompt(Browser* browser, SRTPromptController* controller); | |
|
sky
2017/04/05 21:17:42
This is a weird place to put this code. Move to br
alito
2017/04/06 00:20:22
Done.
| |
| 49 | |
| 46 base::string16 GetWindowTitle() const; | 50 base::string16 GetWindowTitle() const; |
| 47 // The text to be shown in the Cleaner dialog's main section and will | 51 // The text to be shown in the Cleaner dialog's main section and will |
| 48 // always be visible while the dialog is displayed. | 52 // always be visible while the dialog is displayed. |
| 49 std::vector<LabelInfo> GetMainText() const; | 53 std::vector<LabelInfo> GetMainText() const; |
| 50 // The text to be shown in the expandable details section of the | 54 // The text to be shown in the expandable details section of the |
| 51 // Cleaner dialog. | 55 // Cleaner dialog. |
| 52 std::vector<LabelInfo> GetDetailsText() const; | 56 std::vector<LabelInfo> GetDetailsText() const; |
| 53 // The text on the button that expands the details section. | 57 // The text on the button that expands the details section. |
| 54 base::string16 GetShowDetailsLabel() const; | 58 base::string16 GetShowDetailsLabel() const; |
| 55 // The text on the button that folds the details section. | 59 // The text on the button that folds the details section. |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 73 | 77 |
| 74 private: | 78 private: |
| 75 void OnInteractionDone(); | 79 void OnInteractionDone(); |
| 76 | 80 |
| 77 DISALLOW_COPY_AND_ASSIGN(SRTPromptController); | 81 DISALLOW_COPY_AND_ASSIGN(SRTPromptController); |
| 78 }; | 82 }; |
| 79 | 83 |
| 80 } // namespace safe_browsing | 84 } // namespace safe_browsing |
| 81 | 85 |
| 82 #endif // CHROME_BROWSER_SAFE_BROWSING_SRT_PROMPT_CONTROLLER_H_ | 86 #endif // CHROME_BROWSER_SAFE_BROWSING_SRT_PROMPT_CONTROLLER_H_ |
| OLD | NEW |