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_UI_VIEWS_SETTINGS_RESET_PROMPT_DIALOG_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_SETTINGS_RESET_PROMPT_DIALOG_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_SETTINGS_RESET_PROMPT_DIALOG_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_SETTINGS_RESET_PROMPT_DIALOG_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "ui/base/ui_base_types.h" | 10 #include "ui/base/ui_base_types.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 bool ShouldShowWindowIcon() const override; | 39 bool ShouldShowWindowIcon() const override; |
40 base::string16 GetWindowTitle() const override; | 40 base::string16 GetWindowTitle() const override; |
41 | 41 |
42 // ui::DialogModel overrides. | 42 // ui::DialogModel overrides. |
43 bool ShouldDefaultButtonBeBlue() const override; | 43 bool ShouldDefaultButtonBeBlue() const override; |
44 | 44 |
45 // views::DialogDelegate overrides. | 45 // views::DialogDelegate overrides. |
46 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override; | 46 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override; |
47 bool Accept() override; | 47 bool Accept() override; |
48 bool Cancel() override; | 48 bool Cancel() override; |
| 49 // We override |Close()| because we want to distinguish in our metrics between |
| 50 // users clicking the cancel button versus dismissing the dialog in other |
| 51 // ways. |
| 52 bool Close() override; |
49 | 53 |
50 // views::View overrides. | 54 // views::View overrides. |
51 gfx::Size GetPreferredSize() const override; | 55 gfx::Size GetPreferredSize() const override; |
52 | 56 |
53 private: | 57 private: |
54 Browser* browser_; | 58 Browser* browser_; |
55 safe_browsing::SettingsResetPromptController* controller_; | 59 safe_browsing::SettingsResetPromptController* controller_; |
56 bool interaction_done_; | |
57 | 60 |
58 DISALLOW_COPY_AND_ASSIGN(SettingsResetPromptDialog); | 61 DISALLOW_COPY_AND_ASSIGN(SettingsResetPromptDialog); |
59 }; | 62 }; |
60 | 63 |
61 #endif // CHROME_BROWSER_UI_VIEWS_SETTINGS_RESET_PROMPT_DIALOG_H_ | 64 #endif // CHROME_BROWSER_UI_VIEWS_SETTINGS_RESET_PROMPT_DIALOG_H_ |
OLD | NEW |