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 #include "chrome/browser/ui/views/settings_reset_prompt_dialog.h" | 5 #include "chrome/browser/ui/views/settings_reset_prompt_dialog.h" |
6 | 6 |
7 #include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prom
pt_controller.h" | 7 #include "chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prom
pt_controller.h" |
8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
9 #include "chrome/browser/ui/views/frame/browser_view.h" | 9 #include "chrome/browser/ui/views/frame/browser_view.h" |
10 #include "components/constrained_window/constrained_window_views.h" | 10 #include "components/constrained_window/constrained_window_views.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 } | 107 } |
108 | 108 |
109 bool SettingsResetPromptDialog::Cancel() { | 109 bool SettingsResetPromptDialog::Cancel() { |
110 if (!interaction_done_) { | 110 if (!interaction_done_) { |
111 interaction_done_ = true; | 111 interaction_done_ = true; |
112 controller_->Cancel(); | 112 controller_->Cancel(); |
113 } | 113 } |
114 return true; | 114 return true; |
115 } | 115 } |
116 | 116 |
| 117 bool SettingsResetPromptDialog::Close() { |
| 118 if (!interaction_done_) { |
| 119 interaction_done_ = true; |
| 120 controller_->Close(); |
| 121 } |
| 122 return true; |
| 123 } |
| 124 |
117 // View overrides. | 125 // View overrides. |
118 | 126 |
119 gfx::Size SettingsResetPromptDialog::GetPreferredSize() const { | 127 gfx::Size SettingsResetPromptDialog::GetPreferredSize() const { |
120 return gfx::Size(kDialogWidth, GetHeightForWidth(kDialogWidth)); | 128 return gfx::Size(kDialogWidth, GetHeightForWidth(kDialogWidth)); |
121 } | 129 } |
OLD | NEW |