summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-21 12:52:29 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-21 12:52:29 +0000
commit8d0f80014579e4763286b9d4779a9c79d16cd132 (patch)
tree9960516820b0c0c6da24644f0c68245d4ee8a2cb
parent3846fb2460ddb4914193428e5f8f5c6c9826740c (diff)
downloadchromium_src-8d0f80014579e4763286b9d4779a9c79d16cd132.zip
chromium_src-8d0f80014579e4763286b9d4779a9c79d16cd132.tar.gz
chromium_src-8d0f80014579e4763286b9d4779a9c79d16cd132.tar.bz2
views: Make CreatePanelGridLayout a static method of GridLayout class.
Move it from standard_layout.h and rename to just CreatePanel. BUG=None TEST=trybots Review URL: http://codereview.chromium.org/6384002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72128 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/chromeos/login/captcha_view.cc4
-rw-r--r--chrome/browser/chromeos/login/eula_view.cc2
-rw-r--r--chrome/browser/chromeos/login/password_changed_view.cc4
-rw-r--r--chrome/browser/chromeos/options/internet_page_view.cc2
-rw-r--r--chrome/browser/chromeos/options/system_page_view.cc4
-rw-r--r--chrome/browser/chromeos/options/wifi_config_view.cc4
-rw-r--r--chrome/browser/first_run/first_run_win.cc2
-rw-r--r--chrome/browser/ui/input_window_dialog_win.cc4
-rw-r--r--chrome/browser/ui/views/about_ipc_dialog.cc2
-rw-r--r--chrome/browser/ui/views/autofill_profiles_view_win.cc2
-rw-r--r--chrome/browser/ui/views/bookmark_editor_view.cc2
-rw-r--r--chrome/browser/ui/views/clear_browsing_data_view.cc2
-rw-r--r--chrome/browser/ui/views/clear_server_data.cc2
-rw-r--r--chrome/browser/ui/views/collected_cookies_win.cc2
-rw-r--r--chrome/browser/ui/views/create_application_shortcut_view.cc4
-rw-r--r--chrome/browser/ui/views/edit_search_engine_dialog.cc2
-rw-r--r--chrome/browser/ui/views/hung_renderer_view.cc4
-rw-r--r--chrome/browser/ui/views/importer_view.cc2
-rw-r--r--chrome/browser/ui/views/importing_progress_view.cc2
-rw-r--r--chrome/browser/ui/views/instant_confirm_view.cc2
-rw-r--r--chrome/browser/ui/views/keyword_editor_view.cc2
-rw-r--r--chrome/browser/ui/views/login_view.cc2
-rw-r--r--chrome/browser/ui/views/options/advanced_contents_view.cc2
-rw-r--r--chrome/browser/ui/views/options/advanced_page_view.cc2
-rw-r--r--chrome/browser/ui/views/options/cookies_view.cc2
-rw-r--r--chrome/browser/ui/views/options/exception_editor_view.cc2
-rw-r--r--chrome/browser/ui/views/options/exceptions_page_view.cc2
-rw-r--r--chrome/browser/ui/views/options/fonts_page_view.cc2
-rw-r--r--chrome/browser/ui/views/options/languages_page_view.cc2
-rw-r--r--chrome/browser/ui/views/options/passwords_page_view.cc2
-rw-r--r--chrome/browser/ui/views/uninstall_view.cc2
-rw-r--r--chrome/browser/ui/views/url_picker.cc2
-rw-r--r--views/controls/message_box_view.cc4
-rw-r--r--views/grid_layout.cc17
-rw-r--r--views/grid_layout.h5
-rw-r--r--views/standard_layout.h5
36 files changed, 55 insertions, 54 deletions
diff --git a/chrome/browser/chromeos/login/captcha_view.cc b/chrome/browser/chromeos/login/captcha_view.cc
index 88658fc..cf16199 100644
--- a/chrome/browser/chromeos/login/captcha_view.cc
+++ b/chrome/browser/chromeos/login/captcha_view.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -154,7 +154,7 @@ void CaptchaView::Init() {
set_background(views::Background::CreateBackgroundPainter(true, painter));
}
- views::GridLayout* layout = CreatePanelGridLayout(this);
+ views::GridLayout* layout = views::GridLayout::CreatePanel(this);
SetLayoutManager(layout);
int column_view_set_id = 0;
diff --git a/chrome/browser/chromeos/login/eula_view.cc b/chrome/browser/chromeos/login/eula_view.cc
index 5cb76ae..63c9422 100644
--- a/chrome/browser/chromeos/login/eula_view.cc
+++ b/chrome/browser/chromeos/login/eula_view.cc
@@ -130,7 +130,7 @@ class TpmInfoView : public views::View,
};
void TpmInfoView::Init() {
- views::GridLayout* layout = CreatePanelGridLayout(this);
+ views::GridLayout* layout = views::GridLayout::CreatePanel(this);
SetLayoutManager(layout);
views::ColumnSet* column_set = layout->AddColumnSet(0);
column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1,
diff --git a/chrome/browser/chromeos/login/password_changed_view.cc b/chrome/browser/chromeos/login/password_changed_view.cc
index 38c4fc8..7a28a07 100644
--- a/chrome/browser/chromeos/login/password_changed_view.cc
+++ b/chrome/browser/chromeos/login/password_changed_view.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -117,7 +117,7 @@ void PasswordChangedView::Init() {
old_password_field_->SetController(this);
// Define controls layout.
- GridLayout* layout = CreatePanelGridLayout(this);
+ GridLayout* layout = GridLayout::CreatePanel(this);
SetLayoutManager(layout);
views::ColumnSet* column_set = layout->AddColumnSet(0);
diff --git a/chrome/browser/chromeos/options/internet_page_view.cc b/chrome/browser/chromeos/options/internet_page_view.cc
index 5601e34..f4b63766 100644
--- a/chrome/browser/chromeos/options/internet_page_view.cc
+++ b/chrome/browser/chromeos/options/internet_page_view.cc
@@ -534,7 +534,7 @@ void InternetPageContentView::DidChangeBounds(const gfx::Rect& previous,
}
void InternetPageContentView::InitControlLayout() {
- GridLayout* layout = CreatePanelGridLayout(this);
+ GridLayout* layout = GridLayout::CreatePanel(this);
SetLayoutManager(layout);
int single_column_view_set_id = 0;
diff --git a/chrome/browser/chromeos/options/system_page_view.cc b/chrome/browser/chromeos/options/system_page_view.cc
index e251f50..da659c5 100644
--- a/chrome/browser/chromeos/options/system_page_view.cc
+++ b/chrome/browser/chromeos/options/system_page_view.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -379,7 +379,7 @@ void AccessibilitySection::NotifyPrefChanged(const std::string* pref_name) {
// SystemPageView, SettingsPageView implementation:
void SystemPageView::InitControlLayout() {
- GridLayout* layout = CreatePanelGridLayout(this);
+ GridLayout* layout = GridLayout::CreatePanel(this);
SetLayoutManager(layout);
int single_column_view_set_id = 0;
diff --git a/chrome/browser/chromeos/options/wifi_config_view.cc b/chrome/browser/chromeos/options/wifi_config_view.cc
index 413b13c..ad1cd76d 100644
--- a/chrome/browser/chromeos/options/wifi_config_view.cc
+++ b/chrome/browser/chromeos/options/wifi_config_view.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -282,7 +282,7 @@ const std::string WifiConfigView::GetPassphrase() const {
}
void WifiConfigView::Init() {
- views::GridLayout* layout = CreatePanelGridLayout(this);
+ views::GridLayout* layout = views::GridLayout::CreatePanel(this);
SetLayoutManager(layout);
int column_view_set_id = 0;
diff --git a/chrome/browser/first_run/first_run_win.cc b/chrome/browser/first_run/first_run_win.cc
index b50317b..dfad247 100644
--- a/chrome/browser/first_run/first_run_win.cc
+++ b/chrome/browser/first_run/first_run_win.cc
@@ -643,7 +643,7 @@ class TryChromeDialog : public views::ButtonListener,
root_view->set_background(
views::Background::CreateSolidBackground(0xfc, 0xfc, 0xfc));
- views::GridLayout* layout = CreatePanelGridLayout(root_view);
+ views::GridLayout* layout = views::GridLayout::CreatePanel(root_view);
if (!layout) {
NOTREACHED();
return Upgrade::TD_DIALOG_ERROR;
diff --git a/chrome/browser/ui/input_window_dialog_win.cc b/chrome/browser/ui/input_window_dialog_win.cc
index 63b5255..0423797 100644
--- a/chrome/browser/ui/input_window_dialog_win.cc
+++ b/chrome/browser/ui/input_window_dialog_win.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -171,7 +171,7 @@ void ContentView::InitControlLayout() {
using views::GridLayout;
// TODO(sky): Vertical alignment should be baseline.
- GridLayout* layout = CreatePanelGridLayout(this);
+ GridLayout* layout = GridLayout::CreatePanel(this);
SetLayoutManager(layout);
ColumnSet* c1 = layout->AddColumnSet(0);
diff --git a/chrome/browser/ui/views/about_ipc_dialog.cc b/chrome/browser/ui/views/about_ipc_dialog.cc
index b0c6c89..b9bf52d 100644
--- a/chrome/browser/ui/views/about_ipc_dialog.cc
+++ b/chrome/browser/ui/views/about_ipc_dialog.cc
@@ -222,7 +222,7 @@ void AboutIPCDialog::RunDialog() {
}
void AboutIPCDialog::SetupControls() {
- views::GridLayout* layout = CreatePanelGridLayout(this);
+ views::GridLayout* layout = views::GridLayout::CreatePanel(this);
SetLayoutManager(layout);
track_toggle_ = new views::TextButton(this, kStartTrackingLabel);
diff --git a/chrome/browser/ui/views/autofill_profiles_view_win.cc b/chrome/browser/ui/views/autofill_profiles_view_win.cc
index 8708694..8018a6b 100644
--- a/chrome/browser/ui/views/autofill_profiles_view_win.cc
+++ b/chrome/browser/ui/views/autofill_profiles_view_win.cc
@@ -468,7 +468,7 @@ void AutoFillProfilesView::Init() {
remove_button_ = new views::NativeButton(this,
UTF16ToWide(l10n_util::GetStringUTF16(IDS_AUTOFILL_DELETE_BUTTON)));
- views::GridLayout* layout = CreatePanelGridLayout(this);
+ views::GridLayout* layout = views::GridLayout::CreatePanel(this);
SetLayoutManager(layout);
const int table_with_buttons_column_view_set_id = 0;
diff --git a/chrome/browser/ui/views/bookmark_editor_view.cc b/chrome/browser/ui/views/bookmark_editor_view.cc
index ff46b7b..dd925f7 100644
--- a/chrome/browser/ui/views/bookmark_editor_view.cc
+++ b/chrome/browser/ui/views/bookmark_editor_view.cc
@@ -314,7 +314,7 @@ void BookmarkEditorView::Init() {
}
// Yummy layout code.
- GridLayout* layout = CreatePanelGridLayout(this);
+ GridLayout* layout = GridLayout::CreatePanel(this);
SetLayoutManager(layout);
const int labels_column_set_id = 0;
diff --git a/chrome/browser/ui/views/clear_browsing_data_view.cc b/chrome/browser/ui/views/clear_browsing_data_view.cc
index 1135bf4..344880d 100644
--- a/chrome/browser/ui/views/clear_browsing_data_view.cc
+++ b/chrome/browser/ui/views/clear_browsing_data_view.cc
@@ -156,7 +156,7 @@ void ClearBrowsingDataView2::Init() {
}
void ClearBrowsingDataView2::InitControlLayout() {
- GridLayout* layout = CreatePanelGridLayout(this);
+ GridLayout* layout = GridLayout::CreatePanel(this);
this->SetLayoutManager(layout);
int leading_column_set_id = 0;
diff --git a/chrome/browser/ui/views/clear_server_data.cc b/chrome/browser/ui/views/clear_server_data.cc
index d686d8b..ea457c9 100644
--- a/chrome/browser/ui/views/clear_server_data.cc
+++ b/chrome/browser/ui/views/clear_server_data.cc
@@ -112,7 +112,7 @@ void ClearServerDataView::Init() {
}
void ClearServerDataView::InitControlLayout() {
- GridLayout* layout = CreatePanelGridLayout(this);
+ GridLayout* layout = GridLayout::CreatePanel(this);
this->SetLayoutManager(layout);
int centered_column_set_id = 0;
diff --git a/chrome/browser/ui/views/collected_cookies_win.cc b/chrome/browser/ui/views/collected_cookies_win.cc
index 0dfe571..4119014 100644
--- a/chrome/browser/ui/views/collected_cookies_win.cc
+++ b/chrome/browser/ui/views/collected_cookies_win.cc
@@ -221,7 +221,7 @@ void CollectedCookiesWin::Init() {
using views::GridLayout;
- GridLayout* layout = CreatePanelGridLayout(this);
+ GridLayout* layout = GridLayout::CreatePanel(this);
SetLayoutManager(layout);
const int single_column_layout_id = 0;
diff --git a/chrome/browser/ui/views/create_application_shortcut_view.cc b/chrome/browser/ui/views/create_application_shortcut_view.cc
index 19deb29..74c2722 100644
--- a/chrome/browser/ui/views/create_application_shortcut_view.cc
+++ b/chrome/browser/ui/views/create_application_shortcut_view.cc
@@ -119,7 +119,7 @@ void AppInfoView::PrepareDescriptionLabel(const string16& description) {
}
void AppInfoView::SetupLayout() {
- views::GridLayout* layout = CreatePanelGridLayout(this);
+ views::GridLayout* layout = views::GridLayout::CreatePanel(this);
SetLayoutManager(layout);
static const int kColumnSetId = 0;
@@ -263,7 +263,7 @@ void CreateApplicationShortcutView::InitControls() {
#endif
// Layout controls
- views::GridLayout* layout = CreatePanelGridLayout(this);
+ views::GridLayout* layout = views::GridLayout::CreatePanel(this);
SetLayoutManager(layout);
static const int kHeaderColumnSetId = 0;
diff --git a/chrome/browser/ui/views/edit_search_engine_dialog.cc b/chrome/browser/ui/views/edit_search_engine_dialog.cc
index 45d1249..2850691 100644
--- a/chrome/browser/ui/views/edit_search_engine_dialog.cc
+++ b/chrome/browser/ui/views/edit_search_engine_dialog.cc
@@ -147,7 +147,7 @@ void EditSearchEngineDialog::Init() {
const int unrelated_y = kUnrelatedControlVerticalSpacing;
// View and GridLayout take care of deleting GridLayout for us.
- GridLayout* layout = CreatePanelGridLayout(this);
+ GridLayout* layout = GridLayout::CreatePanel(this);
SetLayoutManager(layout);
// Define the structure of the layout.
diff --git a/chrome/browser/ui/views/hung_renderer_view.cc b/chrome/browser/ui/views/hung_renderer_view.cc
index fa6a139..0c16c9a 100644
--- a/chrome/browser/ui/views/hung_renderer_view.cc
+++ b/chrome/browser/ui/views/hung_renderer_view.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -364,7 +364,7 @@ void HungRendererDialogView::Init() {
using views::GridLayout;
using views::ColumnSet;
- GridLayout* layout = CreatePanelGridLayout(this);
+ GridLayout* layout = GridLayout::CreatePanel(this);
SetLayoutManager(layout);
const int double_column_set_id = 0;
diff --git a/chrome/browser/ui/views/importer_view.cc b/chrome/browser/ui/views/importer_view.cc
index 05e7f72..95583c2 100644
--- a/chrome/browser/ui/views/importer_view.cc
+++ b/chrome/browser/ui/views/importer_view.cc
@@ -79,7 +79,7 @@ void ImporterView::SetupControl() {
// Arranges controls by using GridLayout.
const int column_set_id = 0;
- GridLayout* layout = CreatePanelGridLayout(this);
+ GridLayout* layout = GridLayout::CreatePanel(this);
SetLayoutManager(layout);
ColumnSet* column_set = layout->AddColumnSet(column_set_id);
column_set->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0,
diff --git a/chrome/browser/ui/views/importing_progress_view.cc b/chrome/browser/ui/views/importing_progress_view.cc
index 582ff645..657f5c0 100644
--- a/chrome/browser/ui/views/importing_progress_view.cc
+++ b/chrome/browser/ui/views/importing_progress_view.cc
@@ -228,7 +228,7 @@ void ImportingProgressView::InitControlLayout() {
using views::GridLayout;
using views::ColumnSet;
- GridLayout* layout = CreatePanelGridLayout(this);
+ GridLayout* layout = GridLayout::CreatePanel(this);
SetLayoutManager(layout);
gfx::Size ps = state_history_->GetPreferredSize();
diff --git a/chrome/browser/ui/views/instant_confirm_view.cc b/chrome/browser/ui/views/instant_confirm_view.cc
index b7a37da..164ae41 100644
--- a/chrome/browser/ui/views/instant_confirm_view.cc
+++ b/chrome/browser/ui/views/instant_confirm_view.cc
@@ -31,7 +31,7 @@ InstantConfirmView::InstantConfirmView(Profile* profile) : profile_(profile) {
learn_more_link->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
learn_more_link->SetController(this);
- views::GridLayout* layout = CreatePanelGridLayout(this);
+ views::GridLayout* layout = views::GridLayout::CreatePanel(this);
SetLayoutManager(layout);
const int first_column_set = 1;
diff --git a/chrome/browser/ui/views/keyword_editor_view.cc b/chrome/browser/ui/views/keyword_editor_view.cc
index d639f59..5eb1665 100644
--- a/chrome/browser/ui/views/keyword_editor_view.cc
+++ b/chrome/browser/ui/views/keyword_editor_view.cc
@@ -198,7 +198,7 @@ void KeywordEditorView::InitLayoutManager() {
const int related_y = kRelatedControlVerticalSpacing;
const int unrelated_y = kUnrelatedControlVerticalSpacing;
- GridLayout* contents_layout = CreatePanelGridLayout(this);
+ GridLayout* contents_layout = GridLayout::CreatePanel(this);
SetLayoutManager(contents_layout);
// For the table and buttons.
diff --git a/chrome/browser/ui/views/login_view.cc b/chrome/browser/ui/views/login_view.cc
index 9dc7450..da1dc067 100644
--- a/chrome/browser/ui/views/login_view.cc
+++ b/chrome/browser/ui/views/login_view.cc
@@ -43,7 +43,7 @@ LoginView::LoginView(const std::wstring& explanation,
message_label_->SetAllowCharacterBreak(true);
// Initialize the Grid Layout Manager used for this dialog box.
- GridLayout* layout = CreatePanelGridLayout(this);
+ GridLayout* layout = GridLayout::CreatePanel(this);
SetLayoutManager(layout);
// Add the column set for the information message at the top of the dialog
diff --git a/chrome/browser/ui/views/options/advanced_contents_view.cc b/chrome/browser/ui/views/options/advanced_contents_view.cc
index c0b2cb2..51a0073 100644
--- a/chrome/browser/ui/views/options/advanced_contents_view.cc
+++ b/chrome/browser/ui/views/options/advanced_contents_view.cc
@@ -1570,7 +1570,7 @@ void AdvancedContentsView::DidChangeBounds(const gfx::Rect& previous,
// AdvancedContentsView, OptionsPageView implementation:
void AdvancedContentsView::InitControlLayout() {
- GridLayout* layout = CreatePanelGridLayout(this);
+ GridLayout* layout = GridLayout::CreatePanel(this);
SetLayoutManager(layout);
const int single_column_view_set_id = 0;
diff --git a/chrome/browser/ui/views/options/advanced_page_view.cc b/chrome/browser/ui/views/options/advanced_page_view.cc
index 81a8498..276f7fd 100644
--- a/chrome/browser/ui/views/options/advanced_page_view.cc
+++ b/chrome/browser/ui/views/options/advanced_page_view.cc
@@ -129,7 +129,7 @@ void AdvancedPageView::InitControlLayout() {
using views::GridLayout;
using views::ColumnSet;
- GridLayout* layout = CreatePanelGridLayout(this);
+ GridLayout* layout = GridLayout::CreatePanel(this);
SetLayoutManager(layout);
const int single_column_view_set_id = 0;
diff --git a/chrome/browser/ui/views/options/cookies_view.cc b/chrome/browser/ui/views/options/cookies_view.cc
index 465593c..d00ae73 100644
--- a/chrome/browser/ui/views/options/cookies_view.cc
+++ b/chrome/browser/ui/views/options/cookies_view.cc
@@ -320,7 +320,7 @@ void CookiesView::Init() {
using views::GridLayout;
using views::ColumnSet;
- GridLayout* layout = CreatePanelGridLayout(this);
+ GridLayout* layout = GridLayout::CreatePanel(this);
SetLayoutManager(layout);
const int five_column_layout_id = 0;
diff --git a/chrome/browser/ui/views/options/exception_editor_view.cc b/chrome/browser/ui/views/options/exception_editor_view.cc
index 9b32d54..a27143d 100644
--- a/chrome/browser/ui/views/options/exception_editor_view.cc
+++ b/chrome/browser/ui/views/options/exception_editor_view.cc
@@ -123,7 +123,7 @@ void ExceptionEditorView::Init() {
UTF16ToWide(l10n_util::GetStringUTF16(IDS_EXCEPTION_EDITOR_OTR_TITLE)));
incognito_cb_->SetChecked(is_off_the_record_);
- GridLayout* layout = CreatePanelGridLayout(this);
+ GridLayout* layout = GridLayout::CreatePanel(this);
SetLayoutManager(layout);
// For the Textfields.
diff --git a/chrome/browser/ui/views/options/exceptions_page_view.cc b/chrome/browser/ui/views/options/exceptions_page_view.cc
index de037ca..51246b1 100644
--- a/chrome/browser/ui/views/options/exceptions_page_view.cc
+++ b/chrome/browser/ui/views/options/exceptions_page_view.cc
@@ -129,7 +129,7 @@ void ExceptionsPageView::InitControlLayout() {
SetupTable();
// Do the layout thing.
- GridLayout* layout = CreatePanelGridLayout(this);
+ GridLayout* layout = GridLayout::CreatePanel(this);
SetLayoutManager(layout);
const int top_column_set_id = 0;
diff --git a/chrome/browser/ui/views/options/fonts_page_view.cc b/chrome/browser/ui/views/options/fonts_page_view.cc
index f1e1463..7345d8b 100644
--- a/chrome/browser/ui/views/options/fonts_page_view.cc
+++ b/chrome/browser/ui/views/options/fonts_page_view.cc
@@ -257,7 +257,7 @@ void FontsPageView::InitControlLayout() {
using views::GridLayout;
using views::ColumnSet;
- GridLayout* layout = CreatePanelGridLayout(this);
+ GridLayout* layout = GridLayout::CreatePanel(this);
SetLayoutManager(layout);
const int single_column_view_set_id = 0;
diff --git a/chrome/browser/ui/views/options/languages_page_view.cc b/chrome/browser/ui/views/options/languages_page_view.cc
index bcfa114..1af9d7b 100644
--- a/chrome/browser/ui/views/options/languages_page_view.cc
+++ b/chrome/browser/ui/views/options/languages_page_view.cc
@@ -265,7 +265,7 @@ void LanguagesPageView::InitControlLayout() {
using views::GridLayout;
using views::ColumnSet;
- GridLayout* layout = CreatePanelGridLayout(this);
+ GridLayout* layout = GridLayout::CreatePanel(this);
SetLayoutManager(layout);
const int single_column_view_set_id = 0;
diff --git a/chrome/browser/ui/views/options/passwords_page_view.cc b/chrome/browser/ui/views/options/passwords_page_view.cc
index 138a7b2..d59cf95 100644
--- a/chrome/browser/ui/views/options/passwords_page_view.cc
+++ b/chrome/browser/ui/views/options/passwords_page_view.cc
@@ -277,7 +277,7 @@ void PasswordsPageView::InitControlLayout() {
// Do the layout thing.
const int top_column_set_id = 0;
- GridLayout* layout = CreatePanelGridLayout(this);
+ GridLayout* layout = GridLayout::CreatePanel(this);
SetLayoutManager(layout);
// Design the grid.
diff --git a/chrome/browser/ui/views/uninstall_view.cc b/chrome/browser/ui/views/uninstall_view.cc
index 82e7459..c0f2ca6 100644
--- a/chrome/browser/ui/views/uninstall_view.cc
+++ b/chrome/browser/ui/views/uninstall_view.cc
@@ -38,7 +38,7 @@ void UninstallView::SetupControls() {
using views::ColumnSet;
using views::GridLayout;
- GridLayout* layout = CreatePanelGridLayout(this);
+ GridLayout* layout = GridLayout::CreatePanel(this);
SetLayoutManager(layout);
// Message to confirm uninstallation.
diff --git a/chrome/browser/ui/views/url_picker.cc b/chrome/browser/ui/views/url_picker.cc
index dbbd816..88e4c5f 100644
--- a/chrome/browser/ui/views/url_picker.cc
+++ b/chrome/browser/ui/views/url_picker.cc
@@ -66,7 +66,7 @@ UrlPicker::UrlPicker(UrlPickerDelegate* delegate,
url_table_->SetObserver(this);
// Yummy layout code.
- GridLayout* layout = CreatePanelGridLayout(this);
+ GridLayout* layout = GridLayout::CreatePanel(this);
SetLayoutManager(layout);
const int labels_column_set_id = 0;
diff --git a/views/controls/message_box_view.cc b/views/controls/message_box_view.cc
index a239a16..2023ca4 100644
--- a/views/controls/message_box_view.cc
+++ b/views/controls/message_box_view.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -150,7 +150,7 @@ void MessageBoxView::ResetLayoutManager() {
using views::ColumnSet;
// Initialize the Grid Layout Manager used for this dialog box.
- GridLayout* layout = CreatePanelGridLayout(this);
+ GridLayout* layout = GridLayout::CreatePanel(this);
SetLayoutManager(layout);
gfx::Size icon_size;
diff --git a/views/grid_layout.cc b/views/grid_layout.cc
index 5e685ac..b01247f 100644
--- a/views/grid_layout.cc
+++ b/views/grid_layout.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -676,6 +676,14 @@ GridLayout::~GridLayout() {
STLDeleteElements(&rows_);
}
+// static
+GridLayout* GridLayout::CreatePanel(View* host) {
+ GridLayout* layout = new GridLayout(host);
+ layout->SetInsets(kPanelVertMargin, kPanelHorizMargin,
+ kPanelVertMargin, kPanelHorizMargin);
+ return layout;
+}
+
void GridLayout::SetInsets(int top, int left, int bottom, int right) {
top_inset_ = top;
bottom_inset_ = bottom;
@@ -1060,10 +1068,3 @@ ColumnSet* GridLayout::GetLastValidColumnSet() {
}
} // namespace views
-
-views::GridLayout* CreatePanelGridLayout(views::View* host) {
- views::GridLayout* layout = new views::GridLayout(host);
- layout->SetInsets(kPanelVertMargin, kPanelHorizMargin,
- kPanelVertMargin, kPanelHorizMargin);
- return layout;
-}
diff --git a/views/grid_layout.h b/views/grid_layout.h
index a1574ce..bfbfa64 100644
--- a/views/grid_layout.h
+++ b/views/grid_layout.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -105,6 +105,9 @@ class GridLayout : public LayoutManager {
explicit GridLayout(View* host);
virtual ~GridLayout();
+ // Creates a GridLayout with kPanel*Margin insets.
+ static GridLayout* CreatePanel(View* host);
+
// Sets the insets. All views are placed relative to these offsets.
void SetInsets(int top, int left, int bottom, int right);
void SetInsets(const gfx::Insets& insets);
diff --git a/views/standard_layout.h b/views/standard_layout.h
index 9679289..96d36fe 100644
--- a/views/standard_layout.h
+++ b/views/standard_layout.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -67,7 +67,4 @@ const int kButtonHEdgeMargin = 7;
// Horizontal spacing between buttons that are logically related.
const int kRelatedButtonHSpacing = 6;
-// Creates a GridLayout with kPanel*Margin insets.
-views::GridLayout* CreatePanelGridLayout(views::View* host);
-
#endif // VIEWS_STANDARD_LAYOUT_H_