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" |
11 #include "base/string16.h" | 11 #include "base/string16.h" |
12 #include "chrome/browser/process_singleton.h" | 12 #include "chrome/browser/process_singleton.h" |
13 #include "chrome/installer/util/browser_distribution.h" | 13 #include "chrome/installer/util/browser_distribution.h" |
14 #include "grit/chromium_strings.h" | 14 #include "grit/chromium_strings.h" |
15 #include "grit/generated_resources.h" | 15 #include "grit/generated_resources.h" |
16 #include "grit/theme_resources.h" | 16 #include "grit/theme_resources.h" |
17 #include "grit/ui_resources.h" | 17 #include "grit/ui_resources.h" |
18 #include "ui/base/l10n/l10n_util.h" | 18 #include "ui/base/l10n/l10n_util.h" |
19 #include "ui/base/resource/resource_bundle.h" | 19 #include "ui/base/resource/resource_bundle.h" |
20 #include "ui/gfx/image/image.h" | 20 #include "ui/gfx/image/image.h" |
| 21 #include "ui/views/controls/button/checkbox.h" |
21 #include "ui/views/controls/button/image_button.h" | 22 #include "ui/views/controls/button/image_button.h" |
22 #include "ui/views/controls/button/radio_button.h" | 23 #include "ui/views/controls/button/radio_button.h" |
23 #include "ui/views/controls/button/text_button.h" | 24 #include "ui/views/controls/button/text_button.h" |
24 #include "ui/views/controls/image_view.h" | 25 #include "ui/views/controls/image_view.h" |
25 #include "ui/views/controls/link.h" | 26 #include "ui/views/controls/link.h" |
26 #include "ui/views/layout/grid_layout.h" | 27 #include "ui/views/layout/grid_layout.h" |
27 #include "ui/views/layout/layout_constants.h" | 28 #include "ui/views/layout/layout_constants.h" |
28 #include "ui/views/widget/widget.h" | 29 #include "ui/views/widget/widget.h" |
29 | 30 |
30 namespace { | 31 namespace { |
31 | 32 |
32 const wchar_t kHelpCenterUrl[] = | 33 const wchar_t kHelpCenterUrl[] = |
33 L"https://www.google.com/support/chrome/bin/answer.py?answer=150752"; | 34 L"https://www.google.com/support/chrome/bin/answer.py?answer=150752"; |
34 | 35 |
| 36 enum ButtonTags { |
| 37 BT_NONE, |
| 38 BT_CLOSE_BUTTON, |
| 39 BT_OK_BUTTON, |
| 40 BT_TRY_IT_RADIO, |
| 41 BT_DONT_BUG_RADIO |
| 42 }; |
| 43 |
35 } // namespace | 44 } // namespace |
36 | 45 |
37 // static | 46 // static |
38 TryChromeDialogView::Result TryChromeDialogView::Show( | 47 TryChromeDialogView::Result TryChromeDialogView::Show( |
39 size_t flavor, | 48 size_t flavor, |
40 ProcessSingleton* process_singleton) { | 49 ProcessSingleton* process_singleton) { |
41 if (flavor > 10000) { | 50 if (flavor > 10000) { |
42 // This is a test value. We want to make sure we exercise | 51 // This is a test value. We want to make sure we exercise |
43 // returning this early. See TryChromeDialogBrowserTest test. | 52 // returning this early. See TryChromeDialogBrowserTest test. |
44 return NOT_NOW; | 53 return NOT_NOW; |
45 } | 54 } |
46 TryChromeDialogView dialog(flavor); | 55 TryChromeDialogView dialog(flavor); |
47 return dialog.ShowModal(process_singleton); | 56 return dialog.ShowModal(process_singleton); |
48 } | 57 } |
49 | 58 |
50 TryChromeDialogView::TryChromeDialogView(size_t flavor) | 59 TryChromeDialogView::TryChromeDialogView(size_t flavor) |
51 : flavor_(flavor), | 60 : flavor_(flavor), |
52 popup_(NULL), | 61 popup_(NULL), |
53 try_chrome_(NULL), | 62 try_chrome_(NULL), |
54 kill_chrome_(NULL), | 63 kill_chrome_(NULL), |
55 dont_try_chrome_(NULL), | 64 dont_try_chrome_(NULL), |
56 result_(COUNT) { | 65 make_default_(NULL), |
| 66 result_(COUNT) { |
57 } | 67 } |
58 | 68 |
59 TryChromeDialogView::~TryChromeDialogView() { | 69 TryChromeDialogView::~TryChromeDialogView() { |
60 } | 70 } |
61 | 71 |
62 TryChromeDialogView::Result TryChromeDialogView::ShowModal( | 72 TryChromeDialogView::Result TryChromeDialogView::ShowModal( |
63 ProcessSingleton* process_singleton) { | 73 ProcessSingleton* process_singleton) { |
64 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 74 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
65 | 75 |
66 views::ImageView* icon = new views::ImageView(); | 76 views::ImageView* icon = new views::ImageView(); |
(...skipping 16 matching lines...) Expand all Loading... |
83 // The window color is a tiny bit off-white. | 93 // The window color is a tiny bit off-white. |
84 root_view->set_background( | 94 root_view->set_background( |
85 views::Background::CreateSolidBackground(0xfc, 0xfc, 0xfc)); | 95 views::Background::CreateSolidBackground(0xfc, 0xfc, 0xfc)); |
86 | 96 |
87 views::GridLayout* layout = views::GridLayout::CreatePanel(root_view); | 97 views::GridLayout* layout = views::GridLayout::CreatePanel(root_view); |
88 if (!layout) { | 98 if (!layout) { |
89 NOTREACHED(); | 99 NOTREACHED(); |
90 return DIALOG_ERROR; | 100 return DIALOG_ERROR; |
91 } | 101 } |
92 root_view->SetLayoutManager(layout); | 102 root_view->SetLayoutManager(layout); |
| 103 views::ColumnSet* columns; |
93 | 104 |
94 views::ColumnSet* columns; | |
95 // First row: [icon][pad][text][button]. | 105 // First row: [icon][pad][text][button]. |
96 columns = layout->AddColumnSet(0); | 106 columns = layout->AddColumnSet(0); |
97 columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::LEADING, 0, | 107 columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::LEADING, 0, |
98 views::GridLayout::FIXED, icon_size.width(), | 108 views::GridLayout::FIXED, icon_size.width(), |
99 icon_size.height()); | 109 icon_size.height()); |
100 columns->AddPaddingColumn(0, views::kRelatedControlHorizontalSpacing); | 110 columns->AddPaddingColumn(0, views::kRelatedControlHorizontalSpacing); |
101 columns->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1, | 111 columns->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1, |
102 views::GridLayout::USE_PREF, 0, 0); | 112 views::GridLayout::USE_PREF, 0, 0); |
103 columns->AddColumn(views::GridLayout::TRAILING, views::GridLayout::FILL, 1, | 113 columns->AddColumn(views::GridLayout::TRAILING, views::GridLayout::FILL, 1, |
104 views::GridLayout::USE_PREF, 0, 0); | 114 views::GridLayout::USE_PREF, 0, 0); |
105 // Second row: [pad][pad][radio 1]. | 115 |
| 116 // Optional second row: [pad][pad][radio 1]. |
106 columns = layout->AddColumnSet(1); | 117 columns = layout->AddColumnSet(1); |
107 columns->AddPaddingColumn(0, icon_size.width()); | 118 columns->AddPaddingColumn(0, icon_size.width()); |
108 columns->AddPaddingColumn(0, views::kRelatedControlHorizontalSpacing); | 119 columns->AddPaddingColumn(0, views::kRelatedControlHorizontalSpacing); |
109 columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 1, | 120 columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 1, |
110 views::GridLayout::USE_PREF, 0, 0); | 121 views::GridLayout::USE_PREF, 0, 0); |
| 122 |
111 // Third row: [pad][pad][radio 2]. | 123 // Third row: [pad][pad][radio 2]. |
112 columns = layout->AddColumnSet(2); | 124 columns = layout->AddColumnSet(2); |
113 columns->AddPaddingColumn(0, icon_size.width()); | 125 columns->AddPaddingColumn(0, icon_size.width()); |
114 columns->AddPaddingColumn(0, views::kRelatedControlHorizontalSpacing); | 126 columns->AddPaddingColumn(0, views::kRelatedControlHorizontalSpacing); |
115 columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 1, | 127 columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 1, |
116 views::GridLayout::USE_PREF, 0, 0); | 128 views::GridLayout::USE_PREF, 0, 0); |
| 129 |
117 // Fourth row: [pad][pad][button][pad][button]. | 130 // Fourth row: [pad][pad][button][pad][button]. |
118 columns = layout->AddColumnSet(3); | 131 columns = layout->AddColumnSet(3); |
119 columns->AddPaddingColumn(0, icon_size.width()); | 132 columns->AddPaddingColumn(0, icon_size.width()); |
120 columns->AddPaddingColumn(0, views::kRelatedControlHorizontalSpacing); | |
121 columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 0, | 133 columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 0, |
122 views::GridLayout::USE_PREF, 0, 0); | 134 views::GridLayout::USE_PREF, 0, 0); |
123 columns->AddPaddingColumn(0, views::kRelatedButtonHSpacing); | 135 columns->AddPaddingColumn(0, views::kRelatedButtonHSpacing); |
124 columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 0, | 136 columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 0, |
125 views::GridLayout::USE_PREF, 0, 0); | 137 views::GridLayout::USE_PREF, 0, 0); |
| 138 |
126 // Fifth row: [pad][pad][link]. | 139 // Fifth row: [pad][pad][link]. |
127 columns = layout->AddColumnSet(4); | 140 columns = layout->AddColumnSet(4); |
128 columns->AddPaddingColumn(0, icon_size.width()); | 141 columns->AddPaddingColumn(0, icon_size.width()); |
129 columns->AddPaddingColumn(0, views::kRelatedControlHorizontalSpacing); | 142 columns->AddPaddingColumn(0, views::kRelatedControlHorizontalSpacing); |
130 columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 1, | 143 columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 1, |
131 views::GridLayout::USE_PREF, 0, 0); | 144 views::GridLayout::USE_PREF, 0, 0); |
| 145 |
132 // Optional fourth row: [button]. | 146 // Optional fourth row: [button]. |
133 columns = layout->AddColumnSet(5); | 147 columns = layout->AddColumnSet(5); |
134 columns->AddColumn(views::GridLayout::CENTER, views::GridLayout::FILL, 1, | 148 columns->AddColumn(views::GridLayout::CENTER, views::GridLayout::FILL, 1, |
135 views::GridLayout::USE_PREF, 0, 0); | 149 views::GridLayout::USE_PREF, 0, 0); |
| 150 |
| 151 // Optional fourth row: [pad][pad][checkbox]. |
| 152 columns = layout->AddColumnSet(6); |
| 153 columns->AddPaddingColumn(0, icon_size.width()); |
| 154 columns->AddPaddingColumn(0, |
| 155 views::kRelatedControlHorizontalSpacing + views::kPanelHorizIndentation); |
| 156 columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 1, |
| 157 views::GridLayout::USE_PREF, 0, 0); |
136 // First row views. | 158 // First row views. |
137 layout->StartRow(0, 0); | 159 layout->StartRow(0, 0); |
138 layout->AddView(icon); | 160 layout->AddView(icon); |
139 | 161 |
140 // Find out what experiment we are conducting. | 162 // Find out what experiment we are conducting. |
141 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); | 163 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); |
142 if (!dist) { | 164 if (!dist) { |
143 NOTREACHED() << "Cannot determine browser distribution"; | 165 NOTREACHED() << "Cannot determine browser distribution"; |
144 return DIALOG_ERROR; | 166 return DIALOG_ERROR; |
145 } | 167 } |
(...skipping 18 matching lines...) Expand all Loading... |
164 rb.GetNativeImageNamed(IDR_CLOSE_BAR_H).ToImageSkia()); | 186 rb.GetNativeImageNamed(IDR_CLOSE_BAR_H).ToImageSkia()); |
165 close_button->SetImage(views::CustomButton::BS_PUSHED, | 187 close_button->SetImage(views::CustomButton::BS_PUSHED, |
166 rb.GetNativeImageNamed(IDR_CLOSE_BAR_P).ToImageSkia()); | 188 rb.GetNativeImageNamed(IDR_CLOSE_BAR_P).ToImageSkia()); |
167 close_button->set_tag(BT_CLOSE_BUTTON); | 189 close_button->set_tag(BT_CLOSE_BUTTON); |
168 layout->AddView(close_button); | 190 layout->AddView(close_button); |
169 | 191 |
170 // Second row views. | 192 // Second row views. |
171 const string16 try_it(l10n_util::GetStringUTF16(IDS_TRY_TOAST_TRY_OPT)); | 193 const string16 try_it(l10n_util::GetStringUTF16(IDS_TRY_TOAST_TRY_OPT)); |
172 layout->StartRowWithPadding(0, 1, 0, 10); | 194 layout->StartRowWithPadding(0, 1, 0, 10); |
173 try_chrome_ = new views::RadioButton(try_it, 1); | 195 try_chrome_ = new views::RadioButton(try_it, 1); |
| 196 try_chrome_->SetChecked(true); |
| 197 try_chrome_->set_tag(BT_TRY_IT_RADIO); |
| 198 try_chrome_->set_listener(this); |
174 layout->AddView(try_chrome_); | 199 layout->AddView(try_chrome_); |
175 try_chrome_->SetChecked(true); | |
176 | 200 |
177 // Third row views. | 201 // Decide if the don't bug me is a button or a radio button. |
178 layout->StartRow(0, 2); | 202 bool dont_bug_me_button = |
179 if (experiment.compact_bubble) { | 203 experiment.flags & BrowserDistribution::kDontBugMeAsButton ? true : false; |
180 // The compact bubble has, as its second radio button, "Don't bug me". | 204 |
| 205 // Optional third and fourth row views. |
| 206 if (!dont_bug_me_button) { |
| 207 layout->StartRow(0, 1); |
181 const string16 decline(l10n_util::GetStringUTF16(IDS_TRY_TOAST_CANCEL)); | 208 const string16 decline(l10n_util::GetStringUTF16(IDS_TRY_TOAST_CANCEL)); |
182 dont_try_chrome_ = new views::RadioButton(decline, 1); | 209 dont_try_chrome_ = new views::RadioButton(decline, 1); |
| 210 dont_try_chrome_->set_tag(BT_DONT_BUG_RADIO); |
| 211 dont_try_chrome_->set_listener(this); |
183 layout->AddView(dont_try_chrome_); | 212 layout->AddView(dont_try_chrome_); |
184 } else { | 213 } |
185 // The regular bubble has, as its second radio button, "Uninstall Chrome". | 214 if (experiment.flags & BrowserDistribution::kUninstall) { |
| 215 layout->StartRow(0, 2); |
186 const string16 kill_it(l10n_util::GetStringUTF16(IDS_UNINSTALL_CHROME)); | 216 const string16 kill_it(l10n_util::GetStringUTF16(IDS_UNINSTALL_CHROME)); |
187 kill_chrome_ = new views::RadioButton(kill_it, 1); | 217 kill_chrome_ = new views::RadioButton(kill_it, 1); |
188 layout->AddView(kill_chrome_); | 218 layout->AddView(kill_chrome_); |
189 } | 219 } |
| 220 if (experiment.flags & BrowserDistribution::kMakeDefault) { |
| 221 layout->StartRow(0, 6); |
| 222 const string16 default_text( |
| 223 l10n_util::GetStringUTF16(IDS_TRY_TOAST_SET_DEFAULT)); |
| 224 make_default_ = new views::Checkbox(default_text); |
| 225 gfx::Font font = make_default_->font().DeriveFont(0, gfx::Font::ITALIC); |
| 226 make_default_->SetFont(font); |
| 227 make_default_->SetChecked(true); |
| 228 layout->AddView(make_default_); |
| 229 } |
190 | 230 |
191 // Fourth row views. | 231 // Button row, the last or next to last depending on the 'why?' link. |
192 const string16 ok_it(l10n_util::GetStringUTF16(IDS_OK)); | 232 const string16 ok_it(l10n_util::GetStringUTF16(IDS_OK)); |
193 const string16 cancel_it(l10n_util::GetStringUTF16(IDS_TRY_TOAST_CANCEL)); | |
194 const string16 why_this(l10n_util::GetStringUTF16(IDS_TRY_TOAST_WHY)); | |
195 views::Button* accept_button = new views::NativeTextButton(this, ok_it); | 233 views::Button* accept_button = new views::NativeTextButton(this, ok_it); |
196 accept_button->set_tag(BT_OK_BUTTON); | 234 accept_button->set_tag(BT_OK_BUTTON); |
197 | 235 |
198 // The compact bubble uses a centered button column for buttons, since only | 236 layout->StartRowWithPadding(0, dont_bug_me_button ? 3 : 5, 0, 10); |
199 // the OK button appears. | |
200 int column_id_buttons = experiment.compact_bubble ? 5 : 3; | |
201 layout->StartRowWithPadding(0, column_id_buttons, 0, 10); | |
202 layout->AddView(accept_button); | 237 layout->AddView(accept_button); |
203 if (!experiment.compact_bubble) { | 238 if (dont_bug_me_button) { |
204 // The regular bubble needs a "Don't bug me" as a button, since it is not | 239 // The bubble needs a "Don't bug me" as a button or as a radio button, this |
205 // one of the options for the radio buttons. We also decided to include the | 240 // this the button case. |
206 // "Why am I seeing this?" link for the regular bubble only. | 241 const string16 cancel_it(l10n_util::GetStringUTF16(IDS_TRY_TOAST_CANCEL)); |
207 views::Button* cancel_button = new views::NativeTextButton(this, cancel_it); | 242 views::Button* cancel_button = new views::NativeTextButton(this, cancel_it); |
208 cancel_button->set_tag(BT_CLOSE_BUTTON); | 243 cancel_button->set_tag(BT_CLOSE_BUTTON); |
209 layout->AddView(cancel_button); | 244 layout->AddView(cancel_button); |
210 | 245 } |
211 // Fifth row views. | 246 if (experiment.flags & BrowserDistribution::kWhyLink) { |
212 layout->StartRowWithPadding(0, 4, 0, 10); | 247 layout->StartRowWithPadding(0, 4, 0, 10); |
| 248 const string16 why_this(l10n_util::GetStringUTF16(IDS_TRY_TOAST_WHY)); |
213 views::Link* link = new views::Link(why_this); | 249 views::Link* link = new views::Link(why_this); |
214 link->set_listener(this); | 250 link->set_listener(this); |
215 layout->AddView(link); | 251 layout->AddView(link); |
216 } | 252 } |
217 | 253 |
218 // We resize the window according to the layout manager. This takes into | 254 // We resize the window according to the layout manager. This takes into |
219 // account the differences between XP and Vista fonts and buttons. | 255 // account the differences between XP and Vista fonts and buttons. |
220 layout->Layout(root_view); | 256 layout->Layout(root_view); |
221 gfx::Size preferred = layout->GetPreferredSize(root_view); | 257 gfx::Size preferred = layout->GetPreferredSize(root_view); |
222 gfx::Rect pos = ComputeWindowPosition(preferred.width(), preferred.height(), | 258 gfx::Rect pos = ComputeWindowPosition(preferred.width(), preferred.height(), |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 {0, 4}, {1, 2}, {2, 1}, {4, 0}, // Left side. | 298 {0, 4}, {1, 2}, {2, 1}, {4, 0}, // Left side. |
263 {w-4, 0}, {w-2, 1}, {w-1, 2}, {w, 4}, // Right side. | 299 {w-4, 0}, {w-2, 1}, {w-1, 2}, {w, 4}, // Right side. |
264 {w, h}, {0, h} | 300 {w, h}, {0, h} |
265 }; | 301 }; |
266 HRGN region = ::CreatePolygonRgn(polygon, arraysize(polygon), WINDING); | 302 HRGN region = ::CreatePolygonRgn(polygon, arraysize(polygon), WINDING); |
267 ::SetWindowRgn(window, region, FALSE); | 303 ::SetWindowRgn(window, region, FALSE); |
268 } | 304 } |
269 | 305 |
270 void TryChromeDialogView::ButtonPressed(views::Button* sender, | 306 void TryChromeDialogView::ButtonPressed(views::Button* sender, |
271 const views::Event& event) { | 307 const views::Event& event) { |
272 if (sender->tag() == BT_CLOSE_BUTTON) { | 308 if (sender->tag() == BT_DONT_BUG_RADIO) { |
| 309 if (make_default_) { |
| 310 make_default_->SetChecked(false); |
| 311 make_default_->SetState(views::CustomButton::BS_DISABLED); |
| 312 } |
| 313 return; |
| 314 } else if (sender->tag() == BT_TRY_IT_RADIO) { |
| 315 if (make_default_) { |
| 316 make_default_->SetChecked(true); |
| 317 make_default_->SetState(views::CustomButton::BS_NORMAL); |
| 318 } |
| 319 return; |
| 320 } else if (sender->tag() == BT_CLOSE_BUTTON) { |
273 // The user pressed cancel or the [x] button. | 321 // The user pressed cancel or the [x] button. |
274 result_ = NOT_NOW; | 322 result_ = NOT_NOW; |
275 } else if (!try_chrome_) { | 323 } else if (!try_chrome_) { |
276 // We don't have radio buttons, the user pressed ok. | 324 // We don't have radio buttons, the user pressed ok. |
277 result_ = TRY_CHROME; | 325 result_ = TRY_CHROME; |
278 } else { | 326 } else { |
279 // The outcome is according to the selected ratio button. | 327 // The outcome is according to the selected radio button. |
280 if (try_chrome_->checked()) | 328 if (try_chrome_->checked()) |
281 result_ = TRY_CHROME; | 329 result_ = TRY_CHROME; |
282 else if (dont_try_chrome_ && dont_try_chrome_->checked()) | 330 else if (dont_try_chrome_ && dont_try_chrome_->checked()) |
283 result_ = NOT_NOW; | 331 result_ = NOT_NOW; |
284 else if (kill_chrome_ && kill_chrome_->checked()) | 332 else if (kill_chrome_ && kill_chrome_->checked()) |
285 result_ = UNINSTALL_CHROME; | 333 result_ = UNINSTALL_CHROME; |
286 else | 334 else |
287 NOTREACHED() << "Unknown radio button selected"; | 335 NOTREACHED() << "Unknown radio button selected"; |
288 } | 336 } |
| 337 |
| 338 if ((result_ == TRY_CHROME) && make_default_->checked()) |
| 339 result_ = TRY_CHROME_AS_DEFAULT; |
| 340 |
289 popup_->Close(); | 341 popup_->Close(); |
290 MessageLoop::current()->Quit(); | 342 MessageLoop::current()->Quit(); |
291 } | 343 } |
292 | 344 |
293 void TryChromeDialogView::LinkClicked(views::Link* source, int event_flags) { | 345 void TryChromeDialogView::LinkClicked(views::Link* source, int event_flags) { |
294 ::ShellExecuteW(NULL, L"open", kHelpCenterUrl, NULL, NULL, SW_SHOW); | 346 ::ShellExecuteW(NULL, L"open", kHelpCenterUrl, NULL, NULL, SW_SHOW); |
295 } | 347 } |
OLD | NEW |