| OLD | NEW |
| 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" | 8 #include "chrome/browser/ui/views/layout_utils.h" |
| 9 #include "components/strings/grit/components_strings.h" | 9 #include "components/strings/grit/components_strings.h" |
| 10 #include "ui/base/l10n/l10n_util.h" | 10 #include "ui/base/l10n/l10n_util.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 GridLayout::FIXED, kMessageWidth, 0); | 52 GridLayout::FIXED, kMessageWidth, 0); |
| 53 | 53 |
| 54 // Add the column set for the user name and password fields and labels. | 54 // Add the column set for the user name and password fields and labels. |
| 55 const int labels_column_set_id = 1; | 55 const int labels_column_set_id = 1; |
| 56 column_set = layout->AddColumnSet(labels_column_set_id); | 56 column_set = layout->AddColumnSet(labels_column_set_id); |
| 57 if (layout_delegate->UseExtraDialogPadding()) | 57 if (layout_delegate->UseExtraDialogPadding()) |
| 58 column_set->AddPaddingColumn(0, kTextfieldStackHorizontalSpacing); | 58 column_set->AddPaddingColumn(0, kTextfieldStackHorizontalSpacing); |
| 59 column_set->AddColumn(layout_delegate->GetControlLabelGridAlignment(), | 59 column_set->AddColumn(layout_delegate->GetControlLabelGridAlignment(), |
| 60 GridLayout::CENTER, 0, GridLayout::USE_PREF, 0, 0); | 60 GridLayout::CENTER, 0, GridLayout::USE_PREF, 0, 0); |
| 61 column_set->AddPaddingColumn(0, layout_delegate->GetLayoutDistance( | 61 column_set->AddPaddingColumn(0, layout_delegate->GetLayoutDistance( |
| 62 LayoutDelegate::LayoutDistanceType:: | 62 LayoutDelegate::LayoutDistanceType:: |
| 63 RELATED_CONTROL_HORIZONTAL_SPACING)); | 63 RELATED_CONTROL_HORIZONTAL_SPACING)); |
| 64 column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 1, | 64 column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 1, |
| 65 GridLayout::USE_PREF, 0, 0); | 65 GridLayout::USE_PREF, 0, 0); |
| 66 if (layout_delegate->UseExtraDialogPadding()) | 66 if (layout_delegate->UseExtraDialogPadding()) |
| 67 column_set->AddPaddingColumn(0, kTextfieldStackHorizontalSpacing); | 67 column_set->AddPaddingColumn(0, kTextfieldStackHorizontalSpacing); |
| 68 | 68 |
| 69 layout->StartRow(0, single_column_view_set_id); | 69 layout->StartRow(0, single_column_view_set_id); |
| 70 layout->AddView(authority_label_); | 70 layout->AddView(authority_label_); |
| 71 if (!explanation.empty()) { | 71 if (!explanation.empty()) { |
| 72 message_label_ = new views::Label(explanation); | 72 message_label_ = new views::Label(explanation); |
| 73 message_label_->SetMultiLine(true); | 73 message_label_->SetMultiLine(true); |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 | 140 |
| 141 void LoginView::OnLoginModelDestroying() { | 141 void LoginView::OnLoginModelDestroying() { |
| 142 login_model_->RemoveObserver(this); | 142 login_model_->RemoveObserver(this); |
| 143 login_model_ = NULL; | 143 login_model_ = NULL; |
| 144 } | 144 } |
| 145 | 145 |
| 146 const char* LoginView::GetClassName() const { | 146 const char* LoginView::GetClassName() const { |
| 147 return "LoginView"; | 147 return "LoginView"; |
| 148 } | 148 } |
| 149 | 149 |
| OLD | NEW |