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

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

Issue 2922263002: Fix style of profile error dialog. (Closed)
Patch Set: tapted's and pkasting's comments 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/global_error_bubble_view.h" 5 #include "chrome/browser/ui/views/global_error_bubble_view.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 button, base::Bind(&GlobalErrorBubbleView::SizeToContents, 150 button, base::Bind(&GlobalErrorBubbleView::SizeToContents,
151 base::Unretained(this)))); 151 base::Unretained(this))));
152 } 152 }
153 } 153 }
154 } 154 }
155 155
156 bool GlobalErrorBubbleView::ShouldShowCloseButton() const { 156 bool GlobalErrorBubbleView::ShouldShowCloseButton() const {
157 return error_ && error_->ShouldShowCloseButton(); 157 return error_ && error_->ShouldShowCloseButton();
158 } 158 }
159 159
160 bool GlobalErrorBubbleView::ShouldDefaultButtonBeBlue() const {
161 return true;
162 }
163
164 base::string16 GlobalErrorBubbleView::GetDialogButtonLabel( 160 base::string16 GlobalErrorBubbleView::GetDialogButtonLabel(
165 ui::DialogButton button) const { 161 ui::DialogButton button) const {
166 if (!error_) 162 if (!error_)
167 return base::string16(); 163 return base::string16();
168 return button == ui::DIALOG_BUTTON_OK 164 return button == ui::DIALOG_BUTTON_OK
169 ? error_->GetBubbleViewAcceptButtonLabel() 165 ? error_->GetBubbleViewAcceptButtonLabel()
170 : error_->GetBubbleViewCancelButtonLabel(); 166 : error_->GetBubbleViewCancelButtonLabel();
171 } 167 }
172 168
173 int GlobalErrorBubbleView::GetDialogButtons() const { 169 int GlobalErrorBubbleView::GetDialogButtons() const {
(...skipping 18 matching lines...) Expand all
192 } 188 }
193 189
194 bool GlobalErrorBubbleView::Close() { 190 bool GlobalErrorBubbleView::Close() {
195 // Don't fall through to either Cancel() or Accept(). 191 // Don't fall through to either Cancel() or Accept().
196 return true; 192 return true;
197 } 193 }
198 194
199 void GlobalErrorBubbleView::CloseBubbleView() { 195 void GlobalErrorBubbleView::CloseBubbleView() {
200 GetWidget()->Close(); 196 GetWidget()->Close();
201 } 197 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/global_error_bubble_view.h ('k') | chrome/browser/ui/views/ime/ime_warning_bubble_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698