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

Side by Side Diff: chrome/browser/ui/views/crypto_module_password_dialog_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/crypto_module_password_dialog_view.h" 5 #include "chrome/browser/ui/views/crypto_module_password_dialog_view.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/grit/generated_resources.h" 8 #include "chrome/grit/generated_resources.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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 reason_label_->SetMultiLine(true); 115 reason_label_->SetMultiLine(true);
116 116
117 password_label_ = new views::Label(l10n_util::GetStringUTF16( 117 password_label_ = new views::Label(l10n_util::GetStringUTF16(
118 IDS_CRYPTO_MODULE_AUTH_DIALOG_PASSWORD_FIELD)); 118 IDS_CRYPTO_MODULE_AUTH_DIALOG_PASSWORD_FIELD));
119 119
120 password_entry_ = new views::Textfield(); 120 password_entry_ = new views::Textfield();
121 password_entry_->SetTextInputType(ui::TEXT_INPUT_TYPE_PASSWORD); 121 password_entry_->SetTextInputType(ui::TEXT_INPUT_TYPE_PASSWORD);
122 password_entry_->set_controller(this); 122 password_entry_->set_controller(this);
123 123
124 views::GridLayout* layout = views::GridLayout::CreatePanel(this); 124 views::GridLayout* layout = views::GridLayout::CreatePanel(this);
125 SetLayoutManager(layout);
126 125
127 views::ColumnSet* reason_column_set = layout->AddColumnSet(0); 126 views::ColumnSet* reason_column_set = layout->AddColumnSet(0);
128 reason_column_set->AddColumn( 127 reason_column_set->AddColumn(
129 views::GridLayout::LEADING, views::GridLayout::LEADING, 1, 128 views::GridLayout::LEADING, views::GridLayout::LEADING, 1,
130 views::GridLayout::USE_PREF, 0, 0); 129 views::GridLayout::USE_PREF, 0, 0);
131 130
132 views::ColumnSet* column_set = layout->AddColumnSet(1); 131 views::ColumnSet* column_set = layout->AddColumnSet(1);
133 column_set->AddColumn(views::GridLayout::LEADING, 132 column_set->AddColumn(views::GridLayout::LEADING,
134 views::GridLayout::LEADING, 0, 133 views::GridLayout::LEADING, 0,
135 views::GridLayout::USE_PREF, 0, 0); 134 views::GridLayout::USE_PREF, 0, 0);
(...skipping 17 matching lines...) Expand all
153 CryptoModulePasswordReason reason, 152 CryptoModulePasswordReason reason,
154 const std::string& hostname, 153 const std::string& hostname,
155 gfx::NativeWindow parent, 154 gfx::NativeWindow parent,
156 const CryptoModulePasswordCallback& callback) { 155 const CryptoModulePasswordCallback& callback) {
157 CryptoModulePasswordDialogView* dialog = 156 CryptoModulePasswordDialogView* dialog =
158 new CryptoModulePasswordDialogView(slot_name, reason, hostname, callback); 157 new CryptoModulePasswordDialogView(slot_name, reason, hostname, callback);
159 views::DialogDelegate::CreateDialogWidget(dialog, NULL, parent)->Show(); 158 views::DialogDelegate::CreateDialogWidget(dialog, NULL, parent)->Show();
160 } 159 }
161 160
162 } // namespace chrome 161 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698