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

Side by Side Diff: chrome/browser/ui/views/first_run_dialog.cc

Issue 2779973003: views: fold layout_utils::CreatePanelLayout into GridLayout::CreatePanel (Closed)
Patch Set: remove old DEPS entry Created 3 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/first_run_dialog.h" 5 #include "chrome/browser/ui/views/first_run_dialog.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 #endif // defined(GOOGLE_CHROME_BUILD) 74 #endif // defined(GOOGLE_CHROME_BUILD)
75 75
76 return dialog_shown; 76 return dialog_shown;
77 } 77 }
78 78
79 FirstRunDialog::FirstRunDialog(Profile* profile) 79 FirstRunDialog::FirstRunDialog(Profile* profile)
80 : profile_(profile), 80 : profile_(profile),
81 make_default_(NULL), 81 make_default_(NULL),
82 report_crashes_(NULL) { 82 report_crashes_(NULL) {
83 GridLayout* layout = GridLayout::CreatePanel(this); 83 GridLayout* layout = GridLayout::CreatePanel(this);
84 SetLayoutManager(layout);
85 84
86 const int related_y = views::kRelatedControlVerticalSpacing; 85 const int related_y = views::kRelatedControlVerticalSpacing;
87 86
88 views::ColumnSet* column_set = layout->AddColumnSet(0); 87 views::ColumnSet* column_set = layout->AddColumnSet(0);
89 column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 0, 88 column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 0,
90 GridLayout::USE_PREF, 0, 0); 89 GridLayout::USE_PREF, 0, 0);
91 90
92 layout->StartRow(0, 0); 91 layout->StartRow(0, 0);
93 make_default_ = new views::Checkbox(l10n_util::GetStringUTF16( 92 make_default_ = new views::Checkbox(l10n_util::GetStringUTF16(
94 IDS_FR_CUSTOMIZE_DEFAULT_BROWSER)); 93 IDS_FR_CUSTOMIZE_DEFAULT_BROWSER));
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 } 135 }
137 136
138 void FirstRunDialog::WindowClosing() { 137 void FirstRunDialog::WindowClosing() {
139 first_run::SetShouldShowWelcomePage(); 138 first_run::SetShouldShowWelcomePage();
140 Done(); 139 Done();
141 } 140 }
142 141
143 void FirstRunDialog::LinkClicked(views::Link* source, int event_flags) { 142 void FirstRunDialog::LinkClicked(views::Link* source, int event_flags) {
144 platform_util::OpenExternal(profile_, GURL(chrome::kLearnMoreReportingURL)); 143 platform_util::OpenExternal(profile_, GURL(chrome::kLearnMoreReportingURL));
145 } 144 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/first_run_bubble.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