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

Side by Side Diff: chrome/browser/autofill/autofill_cc_infobar_win.cc

Issue 3058011: Add "pushed" as a state a TextButton can show (alongside "normal" and "hover"... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/autofill/autofill_cc_infobar.h" 5 #include "chrome/browser/autofill/autofill_cc_infobar.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "chrome/browser/views/event_utils.h" 9 #include "chrome/browser/views/event_utils.h"
10 #include "chrome/browser/views/infobars/infobar_button_border.h" 10 #include "chrome/browser/views/infobars/infobar_button_border.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 views::TextButton* SaveCCInfoConfirmInfoBar::CreateTextButton( 166 views::TextButton* SaveCCInfoConfirmInfoBar::CreateTextButton(
167 const std::wstring& text) { 167 const std::wstring& text) {
168 views::TextButton* text_button = new views::TextButton(this, std::wstring()); 168 views::TextButton* text_button = new views::TextButton(this, std::wstring());
169 text_button->set_border(new InfoBarButtonBorder); 169 text_button->set_border(new InfoBarButtonBorder);
170 170
171 // Set font colors for different states. 171 // Set font colors for different states.
172 text_button->SetEnabledColor(SK_ColorBLACK); 172 text_button->SetEnabledColor(SK_ColorBLACK);
173 text_button->SetHighlightColor(SK_ColorBLACK); 173 text_button->SetHighlightColor(SK_ColorBLACK);
174 text_button->SetHoverColor(SK_ColorBLACK); 174 text_button->SetHoverColor(SK_ColorBLACK);
175 text_button->SetNormalHasBorder(true); 175 text_button->SetNormalHasBorder(true);
176 text_button->SetShowHighlighted(true);
177 176
178 // Set font then text, then size button to fit text. 177 // Set font then text, then size button to fit text.
179 text_button->SetFont(ResourceBundle::GetSharedInstance().GetFont( 178 text_button->SetFont(ResourceBundle::GetSharedInstance().GetFont(
180 ResourceBundle::MediumFont)); 179 ResourceBundle::MediumFont));
181 text_button->SetText(text); 180 text_button->SetText(text);
182 text_button->ClearMaxTextSize(); 181 text_button->ClearMaxTextSize();
183 text_button->SizeToPreferredSize(); 182 text_button->SizeToPreferredSize();
184 return text_button; 183 return text_button;
185 } 184 }
186 185
187 ConfirmInfoBarDelegate* SaveCCInfoConfirmInfoBar::GetDelegate() { 186 ConfirmInfoBarDelegate* SaveCCInfoConfirmInfoBar::GetDelegate() {
188 return delegate()->AsConfirmInfoBarDelegate(); 187 return delegate()->AsConfirmInfoBarDelegate();
189 } 188 }
190 189
191 InfoBar* CreateAutofillCcInfoBar(ConfirmInfoBarDelegate* delegate) { 190 InfoBar* CreateAutofillCcInfoBar(ConfirmInfoBarDelegate* delegate) {
192 DCHECK(delegate); 191 DCHECK(delegate);
193 return new SaveCCInfoConfirmInfoBar(delegate); 192 return new SaveCCInfoConfirmInfoBar(delegate);
194 } 193 }
195 194
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/status/clock_menu_button.cc » ('j') | views/controls/button/text_button.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698