OLD | NEW |
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 | 8 |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 ui::DialogButton button) const { | 119 ui::DialogButton button) const { |
120 return l10n_util::GetStringUTF16(button == ui::DIALOG_BUTTON_OK | 120 return l10n_util::GetStringUTF16(button == ui::DIALOG_BUTTON_OK |
121 ? IDS_AUTOFILL_SAVE_CARD_PROMPT_ACCEPT | 121 ? IDS_AUTOFILL_SAVE_CARD_PROMPT_ACCEPT |
122 : IDS_NO_THANKS); | 122 : IDS_NO_THANKS); |
123 } | 123 } |
124 | 124 |
125 bool SaveCardBubbleViews::ShouldDefaultButtonBeBlue() const { | 125 bool SaveCardBubbleViews::ShouldDefaultButtonBeBlue() const { |
126 return true; | 126 return true; |
127 } | 127 } |
128 | 128 |
129 gfx::Size SaveCardBubbleViews::GetPreferredSize() const { | 129 gfx::Size SaveCardBubbleViews::GetUnsnappedPreferredSize() const { |
130 return gfx::Size(kBubbleWidth, GetHeightForWidth(kBubbleWidth)); | 130 return gfx::Size(kBubbleWidth, GetHeightForWidth(kBubbleWidth)); |
131 } | 131 } |
132 | 132 |
133 base::string16 SaveCardBubbleViews::GetWindowTitle() const { | 133 base::string16 SaveCardBubbleViews::GetWindowTitle() const { |
134 return controller_ ? controller_->GetWindowTitle() : base::string16(); | 134 return controller_ ? controller_->GetWindowTitle() : base::string16(); |
135 } | 135 } |
136 | 136 |
137 void SaveCardBubbleViews::WindowClosing() { | 137 void SaveCardBubbleViews::WindowClosing() { |
138 if (controller_) | 138 if (controller_) |
139 controller_->OnBubbleClosed(); | 139 controller_->OnBubbleClosed(); |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 | 211 |
212 return view; | 212 return view; |
213 } | 213 } |
214 | 214 |
215 void SaveCardBubbleViews::Init() { | 215 void SaveCardBubbleViews::Init() { |
216 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0)); | 216 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0)); |
217 AddChildView(CreateMainContentView().release()); | 217 AddChildView(CreateMainContentView().release()); |
218 } | 218 } |
219 | 219 |
220 } // namespace autofill | 220 } // namespace autofill |
OLD | NEW |