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

Side by Side Diff: views/controls/message_box_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 | « chrome/browser/ui/views/url_picker.cc ('k') | views/grid_layout.h » ('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 "views/controls/message_box_view.h" 5 #include "views/controls/message_box_view.h"
6 6
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "ui/base/clipboard/clipboard.h" 10 #include "ui/base/clipboard/clipboard.h"
11 #include "ui/base/clipboard/scoped_clipboard_writer.h" 11 #include "ui/base/clipboard/scoped_clipboard_writer.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 } 143 }
144 144
145 ResetLayoutManager(); 145 ResetLayoutManager();
146 } 146 }
147 147
148 void MessageBoxView::ResetLayoutManager() { 148 void MessageBoxView::ResetLayoutManager() {
149 using views::GridLayout; 149 using views::GridLayout;
150 using views::ColumnSet; 150 using views::ColumnSet;
151 151
152 // Initialize the Grid Layout Manager used for this dialog box. 152 // Initialize the Grid Layout Manager used for this dialog box.
153 GridLayout* layout = CreatePanelGridLayout(this); 153 GridLayout* layout = GridLayout::CreatePanel(this);
154 SetLayoutManager(layout); 154 SetLayoutManager(layout);
155 155
156 gfx::Size icon_size; 156 gfx::Size icon_size;
157 if (icon_) 157 if (icon_)
158 icon_size = icon_->GetPreferredSize(); 158 icon_size = icon_->GetPreferredSize();
159 159
160 // Add the column set for the message displayed at the top of the dialog box. 160 // Add the column set for the message displayed at the top of the dialog box.
161 // And an icon, if one has been set. 161 // And an icon, if one has been set.
162 const int message_column_view_set_id = 0; 162 const int message_column_view_set_id = 0;
163 ColumnSet* column_set = layout->AddColumnSet(message_column_view_set_id); 163 ColumnSet* column_set = layout->AddColumnSet(message_column_view_set_id);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 } 207 }
208 208
209 if (checkbox_) { 209 if (checkbox_) {
210 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); 210 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
211 layout->StartRow(0, checkbox_column_view_set_id); 211 layout->StartRow(0, checkbox_column_view_set_id);
212 layout->AddView(checkbox_); 212 layout->AddView(checkbox_);
213 } 213 }
214 214
215 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); 215 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
216 } 216 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/url_picker.cc ('k') | views/grid_layout.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698