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

Side by Side Diff: chrome/browser/ui/views/keyword_editor_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/instant_confirm_view.cc ('k') | chrome/browser/ui/views/login_view.cc » ('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) 2011 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/views/keyword_editor_view.h" 5 #include "chrome/browser/ui/views/keyword_editor_view.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 make_default_button_->SetEnabled(false); 191 make_default_button_->SetEnabled(false);
192 192
193 InitLayoutManager(); 193 InitLayoutManager();
194 } 194 }
195 195
196 void KeywordEditorView::InitLayoutManager() { 196 void KeywordEditorView::InitLayoutManager() {
197 const int related_x = kRelatedControlHorizontalSpacing; 197 const int related_x = kRelatedControlHorizontalSpacing;
198 const int related_y = kRelatedControlVerticalSpacing; 198 const int related_y = kRelatedControlVerticalSpacing;
199 const int unrelated_y = kUnrelatedControlVerticalSpacing; 199 const int unrelated_y = kUnrelatedControlVerticalSpacing;
200 200
201 GridLayout* contents_layout = CreatePanelGridLayout(this); 201 GridLayout* contents_layout = GridLayout::CreatePanel(this);
202 SetLayoutManager(contents_layout); 202 SetLayoutManager(contents_layout);
203 203
204 // For the table and buttons. 204 // For the table and buttons.
205 views::ColumnSet* column_set = contents_layout->AddColumnSet(0); 205 views::ColumnSet* column_set = contents_layout->AddColumnSet(0);
206 column_set->AddColumn(GridLayout::FILL, GridLayout::FILL, 1, 206 column_set->AddColumn(GridLayout::FILL, GridLayout::FILL, 1,
207 GridLayout::USE_PREF, 0, 0); 207 GridLayout::USE_PREF, 0, 0);
208 column_set->AddPaddingColumn(0, related_x); 208 column_set->AddPaddingColumn(0, related_x);
209 column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 0, 209 column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 0,
210 GridLayout::USE_PREF, 0, 0); 210 GridLayout::USE_PREF, 0, 0);
211 211
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 add_button_->SetEnabled(controller_->loaded()); 299 add_button_->SetEnabled(controller_->loaded());
300 } 300 }
301 301
302 void KeywordEditorView::MakeDefaultTemplateURL() { 302 void KeywordEditorView::MakeDefaultTemplateURL() {
303 int new_index = 303 int new_index =
304 controller_->MakeDefaultTemplateURL(table_view_->FirstSelectedRow()); 304 controller_->MakeDefaultTemplateURL(table_view_->FirstSelectedRow());
305 if (new_index >= 0) 305 if (new_index >= 0)
306 table_view_->Select(new_index); 306 table_view_->Select(new_index);
307 default_chosen_ = true; 307 default_chosen_ = true;
308 } 308 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/instant_confirm_view.cc ('k') | chrome/browser/ui/views/login_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698