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

Side by Side Diff: ash/system/locale/tray_locale.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
« no previous file with comments | « ash/system/ime/tray_ime.cc ('k') | ash/system/power/power_status_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ash/system/locale/tray_locale.h" 5 #include "ash/system/locale/tray_locale.h"
6 6
7 #include "ash/system/tray/tray_constants.h" 7 #include "ash/system/tray/tray_constants.h"
8 #include "ash/system/tray/tray_notification_view.h" 8 #include "ash/system/tray/tray_notification_view.h"
9 #include "ash/system/tray/tray_views.h" 9 #include "ash/system/tray/tray_views.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
(...skipping 24 matching lines...) Expand all
35 new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 1)); 35 new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 1));
36 36
37 string16 from = l10n_util::GetDisplayNameForLocale( 37 string16 from = l10n_util::GetDisplayNameForLocale(
38 from_locale, cur_locale, true); 38 from_locale, cur_locale, true);
39 string16 to = l10n_util::GetDisplayNameForLocale( 39 string16 to = l10n_util::GetDisplayNameForLocale(
40 to_locale, cur_locale, true); 40 to_locale, cur_locale, true);
41 41
42 views::Label* message = new views::Label( 42 views::Label* message = new views::Label(
43 l10n_util::GetStringFUTF16( 43 l10n_util::GetStringFUTF16(
44 IDS_ASH_STATUS_TRAY_LOCALE_CHANGE_MESSAGE, from, to)); 44 IDS_ASH_STATUS_TRAY_LOCALE_CHANGE_MESSAGE, from, to));
45 message->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 45 message->SetHorizontalAlignment(gfx::ALIGN_LEFT);
46 message->SetMultiLine(true); 46 message->SetMultiLine(true);
47 message->SizeToFit(kTrayNotificationContentsWidth); 47 message->SizeToFit(kTrayNotificationContentsWidth);
48 AddChildView(message); 48 AddChildView(message);
49 49
50 views::Link* revert = new views::Link( 50 views::Link* revert = new views::Link(
51 l10n_util::GetStringFUTF16( 51 l10n_util::GetStringFUTF16(
52 IDS_ASH_STATUS_TRAY_LOCALE_REVERT_MESSAGE, from)); 52 IDS_ASH_STATUS_TRAY_LOCALE_REVERT_MESSAGE, from));
53 revert->set_listener(this); 53 revert->set_listener(this);
54 revert->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 54 revert->SetHorizontalAlignment(gfx::ALIGN_LEFT);
55 revert->SetMultiLine(true); 55 revert->SetMultiLine(true);
56 revert->SizeToFit(kTrayNotificationContentsWidth); 56 revert->SizeToFit(kTrayNotificationContentsWidth);
57 AddChildView(revert); 57 AddChildView(revert);
58 } 58 }
59 59
60 virtual ~LocaleMessageView() {} 60 virtual ~LocaleMessageView() {}
61 61
62 // Overridden from views::LinkListener. 62 // Overridden from views::LinkListener.
63 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE { 63 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE {
64 if (delegate_) 64 if (delegate_)
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 from_locale_ = from_locale; 139 from_locale_ = from_locale;
140 to_locale_ = to_locale; 140 to_locale_ = to_locale;
141 if (notification_) 141 if (notification_)
142 notification_->Update(delegate, cur_locale_, from_locale_, to_locale_); 142 notification_->Update(delegate, cur_locale_, from_locale_, to_locale_);
143 else 143 else
144 ShowNotificationView(); 144 ShowNotificationView();
145 } 145 }
146 146
147 } // namespace internal 147 } // namespace internal
148 } // namespace ash 148 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/ime/tray_ime.cc ('k') | ash/system/power/power_status_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698