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/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 views::Label* label = new views::Label( | 185 views::Label* label = new views::Label( |
186 l10n_util::GetStringUTF16(experiment.heading)); | 186 l10n_util::GetStringUTF16(experiment.heading)); |
187 label->SetFont(rb.GetFont(ui::ResourceBundle::MediumFont)); | 187 label->SetFont(rb.GetFont(ui::ResourceBundle::MediumFont)); |
188 label->SetMultiLine(true); | 188 label->SetMultiLine(true); |
189 label->SizeToFit(200); | 189 label->SizeToFit(200); |
190 label->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 190 label->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
191 layout->AddView(label); | 191 layout->AddView(label); |
192 // The close button is custom. | 192 // The close button is custom. |
193 views::ImageButton* close_button = new views::ImageButton(this); | 193 views::ImageButton* close_button = new views::ImageButton(this); |
194 close_button->SetImage(views::CustomButton::STATE_NORMAL, | 194 close_button->SetImage(views::CustomButton::STATE_NORMAL, |
195 rb.GetNativeImageNamed(IDR_CLOSE_BAR).ToImageSkia()); | 195 rb.GetNativeImageNamed(IDR_CLOSE_2).ToImageSkia()); |
196 close_button->SetImage(views::CustomButton::STATE_HOVERED, | 196 close_button->SetImage(views::CustomButton::STATE_HOVERED, |
197 rb.GetNativeImageNamed(IDR_CLOSE_BAR_H).ToImageSkia()); | 197 rb.GetNativeImageNamed(IDR_CLOSE_2_H).ToImageSkia()); |
198 close_button->SetImage(views::CustomButton::STATE_PRESSED, | 198 close_button->SetImage(views::CustomButton::STATE_PRESSED, |
199 rb.GetNativeImageNamed(IDR_CLOSE_BAR_P).ToImageSkia()); | 199 rb.GetNativeImageNamed(IDR_CLOSE_2_P).ToImageSkia()); |
200 close_button->set_tag(BT_CLOSE_BUTTON); | 200 close_button->set_tag(BT_CLOSE_BUTTON); |
201 layout->AddView(close_button); | 201 layout->AddView(close_button); |
202 | 202 |
203 // Second row. | 203 // Second row. |
204 layout->StartRowWithPadding(0, 1, 0, 10); | 204 layout->StartRowWithPadding(0, 1, 0, 10); |
205 try_chrome_ = new views::RadioButton( | 205 try_chrome_ = new views::RadioButton( |
206 l10n_util::GetStringUTF16(IDS_TRY_TOAST_TRY_OPT), kRadioGroupID); | 206 l10n_util::GetStringUTF16(IDS_TRY_TOAST_TRY_OPT), kRadioGroupID); |
207 try_chrome_->SetChecked(true); | 207 try_chrome_->SetChecked(true); |
208 try_chrome_->set_tag(BT_TRY_IT_RADIO); | 208 try_chrome_->set_tag(BT_TRY_IT_RADIO); |
209 try_chrome_->set_listener(this); | 209 try_chrome_->set_listener(this); |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 result_ = TRY_CHROME_AS_DEFAULT; | 372 result_ = TRY_CHROME_AS_DEFAULT; |
373 } | 373 } |
374 | 374 |
375 popup_->Close(); | 375 popup_->Close(); |
376 MessageLoop::current()->Quit(); | 376 MessageLoop::current()->Quit(); |
377 } | 377 } |
378 | 378 |
379 void TryChromeDialogView::LinkClicked(views::Link* source, int event_flags) { | 379 void TryChromeDialogView::LinkClicked(views::Link* source, int event_flags) { |
380 ::ShellExecuteW(NULL, L"open", kHelpCenterUrl, NULL, NULL, SW_SHOW); | 380 ::ShellExecuteW(NULL, L"open", kHelpCenterUrl, NULL, NULL, SW_SHOW); |
381 } | 381 } |
OLD | NEW |