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

Side by Side Diff: chrome/browser/ui/views/edit_search_engine_dialog.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
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/edit_search_engine_dialog.h" 5 #include "chrome/browser/ui/views/edit_search_engine_dialog.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/i18n/rtl.h" 8 #include "base/i18n/rtl.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 keyword_iv_ = new ImageView(); 140 keyword_iv_ = new ImageView();
141 url_iv_ = new ImageView(); 141 url_iv_ = new ImageView();
142 142
143 UpdateImageViews(); 143 UpdateImageViews();
144 144
145 const int related_x = kRelatedControlHorizontalSpacing; 145 const int related_x = kRelatedControlHorizontalSpacing;
146 const int related_y = kRelatedControlVerticalSpacing; 146 const int related_y = kRelatedControlVerticalSpacing;
147 const int unrelated_y = kUnrelatedControlVerticalSpacing; 147 const int unrelated_y = kUnrelatedControlVerticalSpacing;
148 148
149 // View and GridLayout take care of deleting GridLayout for us. 149 // View and GridLayout take care of deleting GridLayout for us.
150 GridLayout* layout = CreatePanelGridLayout(this); 150 GridLayout* layout = GridLayout::CreatePanel(this);
151 SetLayoutManager(layout); 151 SetLayoutManager(layout);
152 152
153 // Define the structure of the layout. 153 // Define the structure of the layout.
154 154
155 // For the buttons. 155 // For the buttons.
156 views::ColumnSet* column_set = layout->AddColumnSet(0); 156 views::ColumnSet* column_set = layout->AddColumnSet(0);
157 column_set->AddPaddingColumn(1, 0); 157 column_set->AddPaddingColumn(1, 0);
158 column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 0, 158 column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 0,
159 GridLayout::USE_PREF, 0, 0); 159 GridLayout::USE_PREF, 0, 0);
160 column_set->AddPaddingColumn(0, related_x); 160 column_set->AddPaddingColumn(0, related_x);
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 ResourceBundle::GetSharedInstance().GetBitmapNamed( 259 ResourceBundle::GetSharedInstance().GetBitmapNamed(
260 IDR_INPUT_GOOD)); 260 IDR_INPUT_GOOD));
261 } else { 261 } else {
262 image_view->SetTooltipText( 262 image_view->SetTooltipText(
263 UTF16ToWide(l10n_util::GetStringUTF16(invalid_message_id))); 263 UTF16ToWide(l10n_util::GetStringUTF16(invalid_message_id)));
264 image_view->SetImage( 264 image_view->SetImage(
265 ResourceBundle::GetSharedInstance().GetBitmapNamed( 265 ResourceBundle::GetSharedInstance().GetBitmapNamed(
266 IDR_INPUT_ALERT)); 266 IDR_INPUT_ALERT));
267 } 267 }
268 } 268 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/create_application_shortcut_view.cc ('k') | chrome/browser/ui/views/hung_renderer_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698