| OLD | NEW |
| 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/ui/input_window_dialog.h" | 5 #include "chrome/browser/ui/input_window_dialog.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/task.h" | 9 #include "base/task.h" |
| 10 #include "views/grid_layout.h" | 10 #include "views/grid_layout.h" |
| 11 #include "views/controls/label.h" | 11 #include "views/controls/label.h" |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 | 164 |
| 165 void ContentView::InitControlLayout() { | 165 void ContentView::InitControlLayout() { |
| 166 text_field_ = new views::Textfield; | 166 text_field_ = new views::Textfield; |
| 167 text_field_->SetText(delegate_->contents()); | 167 text_field_->SetText(delegate_->contents()); |
| 168 text_field_->SetController(this); | 168 text_field_->SetController(this); |
| 169 | 169 |
| 170 using views::ColumnSet; | 170 using views::ColumnSet; |
| 171 using views::GridLayout; | 171 using views::GridLayout; |
| 172 | 172 |
| 173 // TODO(sky): Vertical alignment should be baseline. | 173 // TODO(sky): Vertical alignment should be baseline. |
| 174 GridLayout* layout = CreatePanelGridLayout(this); | 174 GridLayout* layout = GridLayout::CreatePanel(this); |
| 175 SetLayoutManager(layout); | 175 SetLayoutManager(layout); |
| 176 | 176 |
| 177 ColumnSet* c1 = layout->AddColumnSet(0); | 177 ColumnSet* c1 = layout->AddColumnSet(0); |
| 178 c1->AddColumn(GridLayout::CENTER, GridLayout::CENTER, 0, | 178 c1->AddColumn(GridLayout::CENTER, GridLayout::CENTER, 0, |
| 179 GridLayout::USE_PREF, 0, 0); | 179 GridLayout::USE_PREF, 0, 0); |
| 180 c1->AddPaddingColumn(0, kRelatedControlHorizontalSpacing); | 180 c1->AddPaddingColumn(0, kRelatedControlHorizontalSpacing); |
| 181 c1->AddColumn(GridLayout::FILL, GridLayout::CENTER, 1, | 181 c1->AddColumn(GridLayout::FILL, GridLayout::CENTER, 1, |
| 182 GridLayout::USE_PREF, kTextfieldWidth, kTextfieldWidth); | 182 GridLayout::USE_PREF, kTextfieldWidth, kTextfieldWidth); |
| 183 | 183 |
| 184 layout->StartRow(0, 0); | 184 layout->StartRow(0, 0); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 const std::wstring& window_title, | 226 const std::wstring& window_title, |
| 227 const std::wstring& label, | 227 const std::wstring& label, |
| 228 const std::wstring& contents, | 228 const std::wstring& contents, |
| 229 Delegate* delegate) { | 229 Delegate* delegate) { |
| 230 return new WinInputWindowDialog(parent, | 230 return new WinInputWindowDialog(parent, |
| 231 window_title, | 231 window_title, |
| 232 label, | 232 label, |
| 233 contents, | 233 contents, |
| 234 delegate); | 234 delegate); |
| 235 } | 235 } |
| OLD | NEW |