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

Side by Side Diff: chrome/browser/ui/views/settings_reset_prompt_dialog.cc

Issue 2922263002: Fix style of profile error dialog. (Closed)
Patch Set: nit Created 3 years, 6 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
OLDNEW
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 "chrome/browser/ui/views/harmony/chrome_layout_provider.h" 10 #include "chrome/browser/ui/views/harmony/chrome_layout_provider.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 bool SettingsResetPromptDialog::ShouldShowWindowIcon() const { 85 bool SettingsResetPromptDialog::ShouldShowWindowIcon() const {
86 return false; 86 return false;
87 } 87 }
88 88
89 base::string16 SettingsResetPromptDialog::GetWindowTitle() const { 89 base::string16 SettingsResetPromptDialog::GetWindowTitle() const {
90 DCHECK(controller_); 90 DCHECK(controller_);
91 return controller_->GetWindowTitle(); 91 return controller_->GetWindowTitle();
92 } 92 }
93 93
94 // DialogModel overrides.
95
96 bool SettingsResetPromptDialog::ShouldDefaultButtonBeBlue() const {
97 return true;
98 }
99
100 // DialogDelegate overrides. 94 // DialogDelegate overrides.
101 95
102 base::string16 SettingsResetPromptDialog::GetDialogButtonLabel( 96 base::string16 SettingsResetPromptDialog::GetDialogButtonLabel(
103 ui::DialogButton button) const { 97 ui::DialogButton button) const {
104 DCHECK(button == ui::DIALOG_BUTTON_OK || button == ui::DIALOG_BUTTON_CANCEL); 98 DCHECK(button == ui::DIALOG_BUTTON_OK || button == ui::DIALOG_BUTTON_CANCEL);
105 DCHECK(controller_); 99 DCHECK(controller_);
106 100
107 if (button == ui::DIALOG_BUTTON_OK) 101 if (button == ui::DIALOG_BUTTON_OK)
108 return controller_->GetButtonLabel(); 102 return controller_->GetButtonLabel();
109 return DialogDelegate::GetDialogButtonLabel(button); 103 return DialogDelegate::GetDialogButtonLabel(button);
(...skipping 21 matching lines...) Expand all
131 controller_ = nullptr; 125 controller_ = nullptr;
132 } 126 }
133 return true; 127 return true;
134 } 128 }
135 129
136 // View overrides. 130 // View overrides.
137 131
138 gfx::Size SettingsResetPromptDialog::CalculatePreferredSize() const { 132 gfx::Size SettingsResetPromptDialog::CalculatePreferredSize() const {
139 return gfx::Size(kDialogWidth, GetHeightForWidth(kDialogWidth)); 133 return gfx::Size(kDialogWidth, GetHeightForWidth(kDialogWidth));
140 } 134 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698