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

Side by Side Diff: chrome/browser/ui/views/network_profile_bubble_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/network_profile_bubble_view.h" 5 #include "chrome/browser/ui/views/network_profile_bubble_view.h"
6 6
7 #include "chrome/browser/prefs/pref_service.h" 7 #include "chrome/browser/prefs/pref_service.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/network_profile_bubble.h" 10 #include "chrome/browser/ui/network_profile_bubble.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::LEADING, 0, 80 columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::LEADING, 0,
81 views::GridLayout::USE_PREF, 0, 0); 81 views::GridLayout::USE_PREF, 0, 0);
82 82
83 layout->StartRow(0, 0); 83 layout->StartRow(0, 0);
84 84
85 views::Label* title = new views::Label( 85 views::Label* title = new views::Label(
86 l10n_util::GetStringFUTF16(IDS_PROFILE_ON_NETWORK_WARNING, 86 l10n_util::GetStringFUTF16(IDS_PROFILE_ON_NETWORK_WARNING,
87 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME))); 87 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)));
88 title->SetMultiLine(true); 88 title->SetMultiLine(true);
89 title->SizeToFit(kNotificationBubbleWidth); 89 title->SizeToFit(kNotificationBubbleWidth);
90 title->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 90 title->SetHorizontalAlignment(gfx::ALIGN_LEFT);
91 layout->AddView(title); 91 layout->AddView(title);
92 92
93 views::ColumnSet* bottom_columns = layout->AddColumnSet(1); 93 views::ColumnSet* bottom_columns = layout->AddColumnSet(1);
94 bottom_columns->AddColumn(views::GridLayout::CENTER, 94 bottom_columns->AddColumn(views::GridLayout::CENTER,
95 views::GridLayout::CENTER, 0, views::GridLayout::USE_PREF, 0, 0); 95 views::GridLayout::CENTER, 0, views::GridLayout::USE_PREF, 0, 0);
96 bottom_columns->AddPaddingColumn(1, 0); 96 bottom_columns->AddPaddingColumn(1, 0);
97 bottom_columns->AddColumn(views::GridLayout::CENTER, 97 bottom_columns->AddColumn(views::GridLayout::CENTER,
98 views::GridLayout::CENTER, 0, views::GridLayout::USE_PREF, 0, 0); 98 views::GridLayout::CENTER, 0, views::GridLayout::USE_PREF, 0, 0);
99 layout->StartRowWithPadding(0, 1, 0, 99 layout->StartRowWithPadding(0, 1, 0,
100 views::kRelatedControlSmallVerticalSpacing); 100 views::kRelatedControlSmallVerticalSpacing);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 content::PAGE_TRANSITION_LINK, false); 132 content::PAGE_TRANSITION_LINK, false);
133 navigator_->OpenURL(params); 133 navigator_->OpenURL(params);
134 134
135 // If the user interacted with the bubble we don't reduce the number of 135 // If the user interacted with the bubble we don't reduce the number of
136 // warnings left. 136 // warnings left.
137 PrefService* prefs = profile_->GetPrefs(); 137 PrefService* prefs = profile_->GetPrefs();
138 int left_warnings = prefs->GetInteger(prefs::kNetworkProfileWarningsLeft); 138 int left_warnings = prefs->GetInteger(prefs::kNetworkProfileWarningsLeft);
139 prefs->SetInteger(prefs::kNetworkProfileWarningsLeft, ++left_warnings); 139 prefs->SetInteger(prefs::kNetworkProfileWarningsLeft, ++left_warnings);
140 GetWidget()->Close(); 140 GetWidget()->Close();
141 } 141 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/login_view.cc ('k') | chrome/browser/ui/views/notifications/balloon_view_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698