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

Side by Side Diff: chrome/browser/ui/views/chrome_cleaner_dialog.h

Issue 2883673002: Chrome Cleaner: Update modal dialog's strings (Closed)
Patch Set: Moved to the non-android section in BUILD file. 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
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/views/chrome_cleaner_dialog.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_UI_VIEWS_CHROME_CLEANER_DIALOG_H_
6 #define CHROME_BROWSER_UI_VIEWS_CHROME_CLEANER_DIALOG_H_
7
8 #include <memory>
9
10 #include "base/macros.h"
11 #include "ui/views/controls/button/button.h"
12 #include "ui/views/window/dialog_delegate.h"
13
14 class Browser;
15
16 namespace safe_browsing {
17 class ChromeCleanerDialogController;
18 }
19
20 // A modal dialog asking the user if they want to remove harmful software from
21 // their computers by running the Chrome Cleanup tool.
22 //
23 // The strings and icons used in the dialog are provided by a
24 // |ChromeCleanerDialogController| object, which will also receive information
25 // about how the user interacts with the dialog. The controller object owns
26 // itself and will delete itself once it has received information about the
27 // user's interaction with the dialog. See the |ChromeCleanerDialogController|
28 // class's description for more details.
29 class ChromeCleanerDialog : public views::DialogDelegateView,
30 public views::ButtonListener {
31 public:
32 // The |controller| object manages its own lifetime and is not owned by
33 // |ChromeCleanerDialog|. See the description of the
34 // |ChromeCleanerDialogController| class for details.
35 explicit ChromeCleanerDialog(
36 safe_browsing::ChromeCleanerDialogController* controller);
37 ~ChromeCleanerDialog() override;
38
39 void Show(Browser* browser);
40
41 // ui::DialogModel overrides.
42 bool ShouldDefaultButtonBeBlue() const override;
43
44 // views::WidgetDelegate overrides.
45 ui::ModalType GetModalType() const override;
46 base::string16 GetWindowTitle() const override;
47
48 // views::DialogDelegate overrides.
49 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override;
50 views::View* CreateExtraView() override;
51 bool Accept() override;
52 bool Cancel() override;
53 bool Close() override;
54
55 // views::View overrides.
56 gfx::Size GetPreferredSize() const override;
57
58 // views::ButtonListener overrides.
59 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
60
61 private:
62 Browser* browser_;
63 // The pointer will be set to nullptr once the controller has been notified of
64 // user interaction since the controller can delete itself after that point.
65 safe_browsing::ChromeCleanerDialogController* controller_;
66
67 DISALLOW_COPY_AND_ASSIGN(ChromeCleanerDialog);
68 };
69
70 #endif // CHROME_BROWSER_UI_VIEWS_CHROME_CLEANER_DIALOG_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/views/chrome_cleaner_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698