OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/passwords/auto_signin_first_run_dialog_view.h" | 5 #include "chrome/browser/ui/views/passwords/auto_signin_first_run_dialog_view.h" |
6 | 6 |
7 #include "chrome/browser/ui/passwords/password_dialog_controller.h" | 7 #include "chrome/browser/ui/passwords/password_dialog_controller.h" |
8 #include "chrome/grit/generated_resources.h" | 8 #include "chrome/grit/generated_resources.h" |
9 #include "components/constrained_window/constrained_window_views.h" | 9 #include "components/constrained_window/constrained_window_views.h" |
10 #include "ui/base/l10n/l10n_util.h" | 10 #include "ui/base/l10n/l10n_util.h" |
11 #include "ui/base/resource/resource_bundle.h" | 11 #include "ui/base/resource/resource_bundle.h" |
12 #include "ui/views/controls/button/label_button.h" | 12 #include "ui/views/controls/button/md_text_button.h" |
13 #include "ui/views/controls/styled_label.h" | 13 #include "ui/views/controls/styled_label.h" |
14 #include "ui/views/layout/grid_layout.h" | 14 #include "ui/views/layout/grid_layout.h" |
15 #include "ui/views/layout/layout_constants.h" | 15 #include "ui/views/layout/layout_constants.h" |
16 #include "ui/views/widget/widget.h" | 16 #include "ui/views/widget/widget.h" |
17 | 17 |
18 namespace { | 18 namespace { |
19 // An identifier for views::ColumnSet. | 19 // An identifier for views::ColumnSet. |
20 enum ColumnSetType { | 20 enum ColumnSetType { |
21 // | | (FILL, FILL) | | | 21 // | | (FILL, FILL) | | |
22 SINGLE_VIEW_COLUMN_SET, | 22 SINGLE_VIEW_COLUMN_SET, |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 views::StyledLabel::RangeStyleInfo::CreateForLink()); | 167 views::StyledLabel::RangeStyleInfo::CreateForLink()); |
168 } | 168 } |
169 layout->StartRowWithPadding(0, SINGLE_VIEW_COLUMN_SET, 0, | 169 layout->StartRowWithPadding(0, SINGLE_VIEW_COLUMN_SET, 0, |
170 2 * views::kRelatedControlVerticalSpacing); | 170 2 * views::kRelatedControlVerticalSpacing); |
171 layout->AddView(content_label); | 171 layout->AddView(content_label); |
172 | 172 |
173 // Buttons. | 173 // Buttons. |
174 BuildColumnSet(layout, DOUBLE_BUTTON_COLUMN_SET); | 174 BuildColumnSet(layout, DOUBLE_BUTTON_COLUMN_SET); |
175 layout->StartRowWithPadding(0, DOUBLE_BUTTON_COLUMN_SET, 0, | 175 layout->StartRowWithPadding(0, DOUBLE_BUTTON_COLUMN_SET, 0, |
176 3 * views::kRelatedControlVerticalSpacing); | 176 3 * views::kRelatedControlVerticalSpacing); |
177 ok_button_ = new views::LabelButton( | 177 ok_button_ = views::MdTextButton::CreateSecondaryUiButton( |
178 this, l10n_util::GetStringUTF16(IDS_AUTO_SIGNIN_FIRST_RUN_OK)); | 178 this, l10n_util::GetStringUTF16(IDS_AUTO_SIGNIN_FIRST_RUN_OK)); |
179 ok_button_->SetStyle(views::Button::STYLE_BUTTON); | 179 turn_off_button_ = views::MdTextButton::CreateSecondaryUiButton( |
180 turn_off_button_ = new views::LabelButton( | |
181 this, l10n_util::GetStringUTF16(IDS_AUTO_SIGNIN_FIRST_RUN_TURN_OFF)); | 180 this, l10n_util::GetStringUTF16(IDS_AUTO_SIGNIN_FIRST_RUN_TURN_OFF)); |
182 turn_off_button_->SetStyle(views::Button::STYLE_BUTTON); | |
183 layout->AddView(ok_button_); | 181 layout->AddView(ok_button_); |
184 layout->AddView(turn_off_button_); | 182 layout->AddView(turn_off_button_); |
185 layout->AddPaddingRow(0, views::kButtonVEdgeMarginNew); | 183 layout->AddPaddingRow(0, views::kButtonVEdgeMarginNew); |
186 } | 184 } |
187 | 185 |
188 AutoSigninFirstRunPrompt* CreateAutoSigninPromptView( | 186 AutoSigninFirstRunPrompt* CreateAutoSigninPromptView( |
189 PasswordDialogController* controller, content::WebContents* web_contents) { | 187 PasswordDialogController* controller, content::WebContents* web_contents) { |
190 return new AutoSigninFirstRunDialogView(controller, web_contents); | 188 return new AutoSigninFirstRunDialogView(controller, web_contents); |
191 } | 189 } |
OLD | NEW |