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

Side by Side Diff: chrome/browser/chromeos/login/captcha_view.cc

Issue 6384002: views: Make CreatePanelGridLayout a static method of GridLayout class. (Closed)
Patch Set: fix trybots Created 9 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/eula_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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/chromeos/login/captcha_view.h" 5 #include "chrome/browser/chromeos/login/captcha_view.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/chromeos/login/helper.h" 10 #include "chrome/browser/chromeos/login/helper.h"
11 #include "chrome/browser/chromeos/login/image_downloader.h" 11 #include "chrome/browser/chromeos/login/image_downloader.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 void CaptchaView::Init() { 148 void CaptchaView::Init() {
149 if (is_standalone_) { 149 if (is_standalone_) {
150 // Use rounded rect background. 150 // Use rounded rect background.
151 set_border(CreateWizardBorder(&BorderDefinition::kUserBorder)); 151 set_border(CreateWizardBorder(&BorderDefinition::kUserBorder));
152 views::Painter* painter = CreateWizardPainter( 152 views::Painter* painter = CreateWizardPainter(
153 &BorderDefinition::kUserBorder); 153 &BorderDefinition::kUserBorder);
154 set_background(views::Background::CreateBackgroundPainter(true, painter)); 154 set_background(views::Background::CreateBackgroundPainter(true, painter));
155 } 155 }
156 156
157 views::GridLayout* layout = CreatePanelGridLayout(this); 157 views::GridLayout* layout = views::GridLayout::CreatePanel(this);
158 SetLayoutManager(layout); 158 SetLayoutManager(layout);
159 159
160 int column_view_set_id = 0; 160 int column_view_set_id = 0;
161 views::ColumnSet* column_set = layout->AddColumnSet(column_view_set_id); 161 views::ColumnSet* column_set = layout->AddColumnSet(column_view_set_id);
162 column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1, 162 column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1,
163 views::GridLayout::USE_PREF, 0, 0); 163 views::GridLayout::USE_PREF, 0, 0);
164 layout->StartRow(0, column_view_set_id); 164 layout->StartRow(0, column_view_set_id);
165 Label* label = new views::Label( 165 Label* label = new views::Label(
166 UTF16ToWide(l10n_util::GetStringUTF16(IDS_LOGIN_CAPTCHA_INSTRUCTIONS))); 166 UTF16ToWide(l10n_util::GetStringUTF16(IDS_LOGIN_CAPTCHA_INSTRUCTIONS)));
167 label->SetMultiLine(true); 167 label->SetMultiLine(true);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 layout->AddView(ok_button_, 1, 1, 202 layout->AddView(ok_button_, 1, 1,
203 views::GridLayout::CENTER, views::GridLayout::CENTER); 203 views::GridLayout::CENTER, views::GridLayout::CENTER);
204 } 204 }
205 205
206 // ImageDownloader will delete itself once URL is fetched. 206 // ImageDownloader will delete itself once URL is fetched.
207 // TODO(nkostylev): Make sure that it works after view is deleted. 207 // TODO(nkostylev): Make sure that it works after view is deleted.
208 new ImageDownloader(this, GURL(captcha_url_), std::string()); 208 new ImageDownloader(this, GURL(captcha_url_), std::string());
209 } 209 }
210 210
211 } // namespace chromeos 211 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/eula_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698