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

Side by Side Diff: chrome/browser/ui/views/infobars/infobar_view.cc

Issue 11377005: Replace Label::Alignment with gfx::HorizontalAlignment (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix remaining Label::Alignment references. Created 8 years, 1 month 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) 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/infobars/infobar_view.h" 5 #include "chrome/browser/ui/views/infobars/infobar_view.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <shellapi.h> 8 #include <shellapi.h>
9 #endif 9 #endif
10 10
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // once we became unowned. 72 // once we became unowned.
73 DCHECK(!menu_runner_.get()); 73 DCHECK(!menu_runner_.get());
74 } 74 }
75 75
76 views::Label* InfoBarView::CreateLabel(const string16& text) const { 76 views::Label* InfoBarView::CreateLabel(const string16& text) const {
77 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 77 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
78 views::Label* label = new views::Label(text, 78 views::Label* label = new views::Label(text,
79 rb.GetFont(ui::ResourceBundle::MediumFont)); 79 rb.GetFont(ui::ResourceBundle::MediumFont));
80 label->SetBackgroundColor(background()->get_color()); 80 label->SetBackgroundColor(background()->get_color());
81 label->SetEnabledColor(SK_ColorBLACK); 81 label->SetEnabledColor(SK_ColorBLACK);
82 label->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 82 label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
83 return label; 83 return label;
84 } 84 }
85 85
86 views::Link* InfoBarView::CreateLink(const string16& text, 86 views::Link* InfoBarView::CreateLink(const string16& text,
87 views::LinkListener* listener) const { 87 views::LinkListener* listener) const {
88 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 88 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
89 views::Link* link = new views::Link; 89 views::Link* link = new views::Link;
90 link->SetText(text); 90 link->SetText(text);
91 link->SetFont(rb.GetFont(ui::ResourceBundle::MediumFont)); 91 link->SetFont(rb.GetFont(ui::ResourceBundle::MediumFont));
92 link->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 92 link->SetHorizontalAlignment(gfx::ALIGN_LEFT);
93 link->set_listener(listener); 93 link->set_listener(listener);
94 link->SetBackgroundColor(background()->get_color()); 94 link->SetBackgroundColor(background()->get_color());
95 link->set_focusable(true); 95 link->set_focusable(true);
96 return link; 96 return link;
97 } 97 }
98 98
99 // static 99 // static
100 views::MenuButton* InfoBarView::CreateMenuButton( 100 views::MenuButton* InfoBarView::CreateMenuButton(
101 const string16& text, 101 const string16& text,
102 views::MenuButtonListener* menu_button_listener) { 102 views::MenuButtonListener* menu_button_listener) {
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 // infobar. 386 // infobar.
387 if (focused_before && focused_now && !Contains(focused_before) && 387 if (focused_before && focused_now && !Contains(focused_before) &&
388 Contains(focused_now) && GetWidget()) { 388 Contains(focused_now) && GetWidget()) {
389 GetWidget()->NotifyAccessibilityEvent( 389 GetWidget()->NotifyAccessibilityEvent(
390 this, ui::AccessibilityTypes::EVENT_ALERT, true); 390 this, ui::AccessibilityTypes::EVENT_ALERT, true);
391 } 391 }
392 } 392 }
393 393
394 void InfoBarView::OnDidChangeFocus(View* focused_before, View* focused_now) { 394 void InfoBarView::OnDidChangeFocus(View* focused_before, View* focused_now) {
395 } 395 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698