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

Side by Side Diff: chrome/browser/ui/views/clear_server_data.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/clear_server_data.h" 5 #include "chrome/browser/ui/views/clear_server_data.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/string16.h" 9 #include "base/string16.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 dashboard_link_->SetController(this); 105 dashboard_link_->SetController(this);
106 dashboard_link_->SetText(UTF16ToWide( 106 dashboard_link_->SetText(UTF16ToWide(
107 l10n_util::GetStringUTF16(IDS_SYNC_PRIVACY_DASHBOARD_LINK_LABEL))); 107 l10n_util::GetStringUTF16(IDS_SYNC_PRIVACY_DASHBOARD_LINK_LABEL)));
108 108
109 status_label_ = new views::Label( 109 status_label_ = new views::Label(
110 UTF16ToWide(l10n_util::GetStringUTF16(IDS_CLEAR_DATA_DELETING))); 110 UTF16ToWide(l10n_util::GetStringUTF16(IDS_CLEAR_DATA_DELETING)));
111 throbber_ = new views::Throbber(50, true); 111 throbber_ = new views::Throbber(50, true);
112 } 112 }
113 113
114 void ClearServerDataView::InitControlLayout() { 114 void ClearServerDataView::InitControlLayout() {
115 GridLayout* layout = CreatePanelGridLayout(this); 115 GridLayout* layout = GridLayout::CreatePanel(this);
116 this->SetLayoutManager(layout); 116 this->SetLayoutManager(layout);
117 117
118 int centered_column_set_id = 0; 118 int centered_column_set_id = 0;
119 ColumnSet * column_set = layout->AddColumnSet(centered_column_set_id); 119 ColumnSet * column_set = layout->AddColumnSet(centered_column_set_id);
120 column_set->AddColumn(GridLayout::FILL, GridLayout::FILL, 1, 120 column_set->AddColumn(GridLayout::FILL, GridLayout::FILL, 1,
121 GridLayout::USE_PREF, 0, 0); 121 GridLayout::USE_PREF, 0, 0);
122 122
123 int left_aligned_column_set_id = 1; 123 int left_aligned_column_set_id = 1;
124 column_set = layout->AddColumnSet(left_aligned_column_set_id); 124 column_set = layout->AddColumnSet(left_aligned_column_set_id);
125 column_set->AddColumn(GridLayout::LEADING, GridLayout::FILL, 1, 125 column_set->AddColumn(GridLayout::LEADING, GridLayout::FILL, 1,
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 throbber_->Stop(); 335 throbber_->Stop();
336 } 336 }
337 337
338 void ClearServerDataView::UpdateClearButtonEnabledState( 338 void ClearServerDataView::UpdateClearButtonEnabledState(
339 bool delete_in_progress) { 339 bool delete_in_progress) {
340 this->clear_server_data_button_->SetEnabled( 340 this->clear_server_data_button_->SetEnabled(
341 sync_service_ != NULL && 341 sync_service_ != NULL &&
342 sync_service_->HasSyncSetupCompleted() && 342 sync_service_->HasSyncSetupCompleted() &&
343 !delete_in_progress && allow_clear_); 343 !delete_in_progress && allow_clear_);
344 } 344 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/clear_browsing_data_view.cc ('k') | chrome/browser/ui/views/collected_cookies_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698