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

Side by Side Diff: chrome/browser/ui/views/login_view.cc

Issue 2779973003: views: fold layout_utils::CreatePanelLayout into GridLayout::CreatePanel (Closed)
Patch Set: remove old DEPS entry Created 3 years, 8 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
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/login_view.h" 5 #include "chrome/browser/ui/views/login_view.h"
6 6
7 #include "chrome/browser/ui/views/harmony/layout_delegate.h" 7 #include "chrome/browser/ui/views/harmony/layout_delegate.h"
8 #include "chrome/browser/ui/views/layout_utils.h"
9 #include "components/strings/grit/components_strings.h" 8 #include "components/strings/grit/components_strings.h"
10 #include "ui/base/l10n/l10n_util.h" 9 #include "ui/base/l10n/l10n_util.h"
11 #include "ui/views/controls/label.h" 10 #include "ui/views/controls/label.h"
12 #include "ui/views/controls/textfield/textfield.h" 11 #include "ui/views/controls/textfield/textfield.h"
13 #include "ui/views/layout/grid_layout.h" 12 #include "ui/views/layout/grid_layout.h"
14 13
15 static const int kMessageWidth = 320; 14 static const int kMessageWidth = 320;
16 static const int kTextfieldStackHorizontalSpacing = 30; 15 static const int kTextfieldStackHorizontalSpacing = 30;
17 16
18 using password_manager::LoginModel; 17 using password_manager::LoginModel;
(...skipping 15 matching lines...) Expand all
34 message_label_(nullptr), 33 message_label_(nullptr),
35 login_model_(login_model_data ? login_model_data->model : nullptr) { 34 login_model_(login_model_data ? login_model_data->model : nullptr) {
36 LayoutDelegate* layout_delegate = LayoutDelegate::Get(); 35 LayoutDelegate* layout_delegate = LayoutDelegate::Get();
37 password_field_->SetTextInputType(ui::TEXT_INPUT_TYPE_PASSWORD); 36 password_field_->SetTextInputType(ui::TEXT_INPUT_TYPE_PASSWORD);
38 37
39 authority_label_->SetMultiLine(true); 38 authority_label_->SetMultiLine(true);
40 authority_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); 39 authority_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
41 authority_label_->SetAllowCharacterBreak(true); 40 authority_label_->SetAllowCharacterBreak(true);
42 41
43 // Initialize the Grid Layout Manager used for this dialog box. 42 // Initialize the Grid Layout Manager used for this dialog box.
44 GridLayout* layout = layout_utils::CreatePanelLayout(this); 43 GridLayout* layout = GridLayout::CreatePanel(this);
45 44
46 // Add the column set for the information message at the top of the dialog 45 // Add the column set for the information message at the top of the dialog
47 // box. 46 // box.
48 const int single_column_view_set_id = 0; 47 const int single_column_view_set_id = 0;
49 views::ColumnSet* column_set = 48 views::ColumnSet* column_set =
50 layout->AddColumnSet(single_column_view_set_id); 49 layout->AddColumnSet(single_column_view_set_id);
51 column_set->AddColumn(GridLayout::FILL, GridLayout::FILL, 1, 50 column_set->AddColumn(GridLayout::FILL, GridLayout::FILL, 1,
52 GridLayout::FIXED, kMessageWidth, 0); 51 GridLayout::FIXED, kMessageWidth, 0);
53 52
54 // Add the column set for the user name and password fields and labels. 53 // Add the column set for the user name and password fields and labels.
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 144
146 void LoginView::OnLoginModelDestroying() { 145 void LoginView::OnLoginModelDestroying() {
147 login_model_->RemoveObserver(this); 146 login_model_->RemoveObserver(this);
148 login_model_ = NULL; 147 login_model_ = NULL;
149 } 148 }
150 149
151 const char* LoginView::GetClassName() const { 150 const char* LoginView::GetClassName() const {
152 return "LoginView"; 151 return "LoginView";
153 } 152 }
154 153
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/layout_utils.cc ('k') | chrome/browser/ui/views/sync/one_click_signin_dialog_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698