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

Side by Side Diff: chrome/browser/ui/views/uninstall_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
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/uninstall_view.h" 5 #include "chrome/browser/ui/views/uninstall_view.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
(...skipping 20 matching lines...) Expand all
31 31
32 UninstallView::~UninstallView() { 32 UninstallView::~UninstallView() {
33 // Exit the message loop we were started with so that uninstall can continue. 33 // Exit the message loop we were started with so that uninstall can continue.
34 MessageLoop::current()->Quit(); 34 MessageLoop::current()->Quit();
35 } 35 }
36 36
37 void UninstallView::SetupControls() { 37 void UninstallView::SetupControls() {
38 using views::ColumnSet; 38 using views::ColumnSet;
39 using views::GridLayout; 39 using views::GridLayout;
40 40
41 GridLayout* layout = CreatePanelGridLayout(this); 41 GridLayout* layout = GridLayout::CreatePanel(this);
42 SetLayoutManager(layout); 42 SetLayoutManager(layout);
43 43
44 // Message to confirm uninstallation. 44 // Message to confirm uninstallation.
45 int column_set_id = 0; 45 int column_set_id = 0;
46 ColumnSet* column_set = layout->AddColumnSet(column_set_id); 46 ColumnSet* column_set = layout->AddColumnSet(column_set_id);
47 column_set->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0, 47 column_set->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0,
48 GridLayout::USE_PREF, 0, 0); 48 GridLayout::USE_PREF, 0, 0);
49 layout->StartRow(0, column_set_id); 49 layout->StartRow(0, column_set_id);
50 confirm_label_ = new views::Label(UTF16ToWide( 50 confirm_label_ = new views::Label(UTF16ToWide(
51 l10n_util::GetStringUTF16(IDS_UNINSTALL_VERIFY))); 51 l10n_util::GetStringUTF16(IDS_UNINSTALL_VERIFY)));
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 DCHECK(!browsers_->empty()); 145 DCHECK(!browsers_->empty());
146 return browsers_->size(); 146 return browsers_->size();
147 } 147 }
148 148
149 string16 UninstallView::GetItemAt(int index) { 149 string16 UninstallView::GetItemAt(int index) {
150 DCHECK(index < (int) browsers_->size()); 150 DCHECK(index < (int) browsers_->size());
151 BrowsersMap::const_iterator it = browsers_->begin(); 151 BrowsersMap::const_iterator it = browsers_->begin();
152 std::advance(it, index); 152 std::advance(it, index);
153 return WideToUTF16Hack((*it).first); 153 return WideToUTF16Hack((*it).first);
154 } 154 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/options/passwords_page_view.cc ('k') | chrome/browser/ui/views/url_picker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698