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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 int SaveCardBubbleViews::GetDialogButtons() const { | 112 int SaveCardBubbleViews::GetDialogButtons() const { |
113 // This is the default for BubbleDialogDelegateView, but it's not the default | 113 // This is the default for BubbleDialogDelegateView, but it's not the default |
114 // for LocationBarBubbleDelegateView. | 114 // for LocationBarBubbleDelegateView. |
115 return ui::DIALOG_BUTTON_OK | ui::DIALOG_BUTTON_CANCEL; | 115 return ui::DIALOG_BUTTON_OK | ui::DIALOG_BUTTON_CANCEL; |
116 } | 116 } |
117 | 117 |
118 base::string16 SaveCardBubbleViews::GetDialogButtonLabel( | 118 base::string16 SaveCardBubbleViews::GetDialogButtonLabel( |
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_AUTOFILL_SAVE_CARD_PROMPT_DENY); | 122 : IDS_AUTOFILL_INFOBAR_PROMPT_DENY); |
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::GetPreferredSize() const { |
130 return gfx::Size(kBubbleWidth, GetHeightForWidth(kBubbleWidth)); | 130 return gfx::Size(kBubbleWidth, GetHeightForWidth(kBubbleWidth)); |
131 } | 131 } |
132 | 132 |
(...skipping 78 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 |