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

Side by Side Diff: chrome/browser/ui/views/autofill/save_card_bubble_views.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/autofill/save_card_bubble_views.h" 5 #include "chrome/browser/ui/views/autofill/save_card_bubble_views.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 return true; 132 return true;
133 } 133 }
134 134
135 base::string16 SaveCardBubbleViews::GetDialogButtonLabel( 135 base::string16 SaveCardBubbleViews::GetDialogButtonLabel(
136 ui::DialogButton button) const { 136 ui::DialogButton button) const {
137 return l10n_util::GetStringUTF16(button == ui::DIALOG_BUTTON_OK 137 return l10n_util::GetStringUTF16(button == ui::DIALOG_BUTTON_OK
138 ? IDS_AUTOFILL_SAVE_CARD_PROMPT_ACCEPT 138 ? IDS_AUTOFILL_SAVE_CARD_PROMPT_ACCEPT
139 : IDS_NO_THANKS); 139 : IDS_NO_THANKS);
140 } 140 }
141 141
142 bool SaveCardBubbleViews::ShouldDefaultButtonBeBlue() const {
143 return true;
144 }
145
146 gfx::Size SaveCardBubbleViews::CalculatePreferredSize() const { 142 gfx::Size SaveCardBubbleViews::CalculatePreferredSize() const {
147 return gfx::Size(kBubbleWidth, GetHeightForWidth(kBubbleWidth)); 143 return gfx::Size(kBubbleWidth, GetHeightForWidth(kBubbleWidth));
148 } 144 }
149 145
150 base::string16 SaveCardBubbleViews::GetWindowTitle() const { 146 base::string16 SaveCardBubbleViews::GetWindowTitle() const {
151 return controller_ ? controller_->GetWindowTitle() : base::string16(); 147 return controller_ ? controller_->GetWindowTitle() : base::string16();
152 } 148 }
153 149
154 void SaveCardBubbleViews::WindowClosing() { 150 void SaveCardBubbleViews::WindowClosing() {
155 if (controller_) 151 if (controller_)
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 void SaveCardBubbleViews::Init() { 275 void SaveCardBubbleViews::Init() {
280 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical)); 276 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical));
281 view_stack_ = new ViewStack(); 277 view_stack_ = new ViewStack();
282 view_stack_->SetBackground(views::CreateThemedSolidBackground( 278 view_stack_->SetBackground(views::CreateThemedSolidBackground(
283 view_stack_, ui::NativeTheme::kColorId_BubbleBackground)); 279 view_stack_, ui::NativeTheme::kColorId_BubbleBackground));
284 view_stack_->Push(CreateMainContentView(), /*animate=*/false); 280 view_stack_->Push(CreateMainContentView(), /*animate=*/false);
285 AddChildView(view_stack_); 281 AddChildView(view_stack_);
286 } 282 }
287 283
288 } // namespace autofill 284 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/autofill/save_card_bubble_views.h ('k') | chrome/browser/ui/views/chrome_cleaner_dialog_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698