| 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/chrome_cleaner_dialog_win.h" | 5 #include "chrome/browser/ui/views/chrome_cleaner_dialog_win.h" |
| 6 | 6 |
| 7 #include "base/strings/string16.h" | 7 #include "base/strings/string16.h" |
| 8 #include "chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_dialog_cont
roller_win.h" | 8 #include "chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_dialog_cont
roller_win.h" |
| 9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
| 10 #include "chrome/browser/ui/browser_dialogs.h" | 10 #include "chrome/browser/ui/browser_dialogs.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 DCHECK(!browser_); | 65 DCHECK(!browser_); |
| 66 DCHECK(controller_); | 66 DCHECK(controller_); |
| 67 | 67 |
| 68 browser_ = browser; | 68 browser_ = browser; |
| 69 constrained_window::CreateBrowserModalDialogViews( | 69 constrained_window::CreateBrowserModalDialogViews( |
| 70 this, browser_->window()->GetNativeWindow()) | 70 this, browser_->window()->GetNativeWindow()) |
| 71 ->Show(); | 71 ->Show(); |
| 72 controller_->DialogShown(); | 72 controller_->DialogShown(); |
| 73 } | 73 } |
| 74 | 74 |
| 75 // DialogModel overrides. | |
| 76 | |
| 77 bool ChromeCleanerDialog::ShouldDefaultButtonBeBlue() const { | |
| 78 return true; | |
| 79 } | |
| 80 | |
| 81 // WidgetDelegate overrides. | 75 // WidgetDelegate overrides. |
| 82 | 76 |
| 83 ui::ModalType ChromeCleanerDialog::GetModalType() const { | 77 ui::ModalType ChromeCleanerDialog::GetModalType() const { |
| 84 return ui::MODAL_TYPE_WINDOW; | 78 return ui::MODAL_TYPE_WINDOW; |
| 85 } | 79 } |
| 86 | 80 |
| 87 base::string16 ChromeCleanerDialog::GetWindowTitle() const { | 81 base::string16 ChromeCleanerDialog::GetWindowTitle() const { |
| 88 DCHECK(controller_); | 82 DCHECK(controller_); |
| 89 return controller_->GetWindowTitle(); | 83 return controller_->GetWindowTitle(); |
| 90 } | 84 } |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 DCHECK(browser_); | 137 DCHECK(browser_); |
| 144 | 138 |
| 145 // TODO(alito): Navigate to the webui version of the Chrome Cleaner UI when | 139 // TODO(alito): Navigate to the webui version of the Chrome Cleaner UI when |
| 146 // that is implemented. | 140 // that is implemented. |
| 147 if (controller_) { | 141 if (controller_) { |
| 148 controller_->DetailsButtonClicked(); | 142 controller_->DetailsButtonClicked(); |
| 149 controller_ = nullptr; | 143 controller_ = nullptr; |
| 150 } | 144 } |
| 151 GetWidget()->Close(); | 145 GetWidget()->Close(); |
| 152 } | 146 } |
| OLD | NEW |