OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/first_run/try_chrome_dialog_view.h" | 5 #include "chrome/browser/first_run/try_chrome_dialog_view.h" |
6 | 6 |
7 #include <shellapi.h> | 7 #include <shellapi.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 views::MdTextButton::CreateSecondaryUiButton( | 226 views::MdTextButton::CreateSecondaryUiButton( |
227 this, l10n_util::GetStringUTF16(IDS_OK)); | 227 this, l10n_util::GetStringUTF16(IDS_OK)); |
228 accept_button->set_tag(BT_OK_BUTTON); | 228 accept_button->set_tag(BT_OK_BUTTON); |
229 | 229 |
230 views::Separator* separator = NULL; | 230 views::Separator* separator = NULL; |
231 if (experiment.flags & installer::kToastUiMakeDefault) { | 231 if (experiment.flags & installer::kToastUiMakeDefault) { |
232 // In this flavor we have some veritical space, then a separator line | 232 // In this flavor we have some veritical space, then a separator line |
233 // and the 'make default' checkbox and the OK button on the same row. | 233 // and the 'make default' checkbox and the OK button on the same row. |
234 layout->AddPaddingRow(0, views::kUnrelatedControlVerticalSpacing); | 234 layout->AddPaddingRow(0, views::kUnrelatedControlVerticalSpacing); |
235 layout->StartRow(0, 6); | 235 layout->StartRow(0, 6); |
236 separator = new views::Separator(views::Separator::HORIZONTAL); | 236 separator = new views::Separator(); |
237 layout->AddView(separator); | 237 layout->AddView(separator); |
238 layout->AddPaddingRow(0, views::kUnrelatedControlVerticalSpacing); | 238 layout->AddPaddingRow(0, views::kUnrelatedControlVerticalSpacing); |
239 | 239 |
240 layout->StartRow(0, 7); | 240 layout->StartRow(0, 7); |
241 make_default_ = new views::Checkbox( | 241 make_default_ = new views::Checkbox( |
242 l10n_util::GetStringUTF16(IDS_TRY_TOAST_SET_DEFAULT)); | 242 l10n_util::GetStringUTF16(IDS_TRY_TOAST_SET_DEFAULT)); |
243 make_default_->SetChecked(true); | 243 make_default_->SetChecked(true); |
244 layout->AddView(make_default_); | 244 layout->AddView(make_default_); |
245 layout->AddView(accept_button); | 245 layout->AddView(accept_button); |
246 } else { | 246 } else { |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 result_ = TRY_CHROME_AS_DEFAULT; | 361 result_ = TRY_CHROME_AS_DEFAULT; |
362 } | 362 } |
363 | 363 |
364 popup_->Close(); | 364 popup_->Close(); |
365 base::MessageLoop::current()->QuitWhenIdle(); | 365 base::MessageLoop::current()->QuitWhenIdle(); |
366 } | 366 } |
367 | 367 |
368 void TryChromeDialogView::LinkClicked(views::Link* source, int event_flags) { | 368 void TryChromeDialogView::LinkClicked(views::Link* source, int event_flags) { |
369 ::ShellExecuteW(NULL, L"open", kHelpCenterUrl, NULL, NULL, SW_SHOW); | 369 ::ShellExecuteW(NULL, L"open", kHelpCenterUrl, NULL, NULL, SW_SHOW); |
370 } | 370 } |
OLD | NEW |