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/ui/views/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" |
11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
12 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
14 #include "chrome/browser/process_singleton.h" | 14 #include "chrome/browser/process_singleton.h" |
| 15 #include "chrome/browser/ui/views/harmony/chrome_layout_provider.h" |
15 #include "chrome/grit/chromium_strings.h" | 16 #include "chrome/grit/chromium_strings.h" |
16 #include "chrome/grit/generated_resources.h" | 17 #include "chrome/grit/generated_resources.h" |
17 #include "chrome/grit/theme_resources.h" | 18 #include "chrome/grit/theme_resources.h" |
18 #include "chrome/install_static/install_util.h" | 19 #include "chrome/install_static/install_util.h" |
19 #include "chrome/installer/util/user_experiment.h" | 20 #include "chrome/installer/util/user_experiment.h" |
20 #include "components/strings/grit/components_strings.h" | 21 #include "components/strings/grit/components_strings.h" |
21 #include "ui/aura/window.h" | 22 #include "ui/aura/window.h" |
22 #include "ui/aura/window_tree_host.h" | 23 #include "ui/aura/window_tree_host.h" |
23 #include "ui/base/l10n/l10n_util.h" | 24 #include "ui/base/l10n/l10n_util.h" |
24 #include "ui/base/resource/resource_bundle.h" | 25 #include "ui/base/resource/resource_bundle.h" |
25 #include "ui/gfx/image/image.h" | 26 #include "ui/gfx/image/image.h" |
26 #include "ui/resources/grit/ui_resources.h" | 27 #include "ui/resources/grit/ui_resources.h" |
27 #include "ui/views/background.h" | 28 #include "ui/views/background.h" |
28 #include "ui/views/controls/button/checkbox.h" | 29 #include "ui/views/controls/button/checkbox.h" |
29 #include "ui/views/controls/button/image_button.h" | 30 #include "ui/views/controls/button/image_button.h" |
30 #include "ui/views/controls/button/md_text_button.h" | 31 #include "ui/views/controls/button/md_text_button.h" |
31 #include "ui/views/controls/button/radio_button.h" | 32 #include "ui/views/controls/button/radio_button.h" |
32 #include "ui/views/controls/image_view.h" | 33 #include "ui/views/controls/image_view.h" |
33 #include "ui/views/controls/link.h" | 34 #include "ui/views/controls/link.h" |
34 #include "ui/views/controls/separator.h" | 35 #include "ui/views/controls/separator.h" |
35 #include "ui/views/layout/grid_layout.h" | 36 #include "ui/views/layout/grid_layout.h" |
36 #include "ui/views/layout/layout_constants.h" | |
37 #include "ui/views/layout/layout_provider.h" | 37 #include "ui/views/layout/layout_provider.h" |
38 #include "ui/views/widget/widget.h" | 38 #include "ui/views/widget/widget.h" |
39 | 39 |
40 namespace { | 40 namespace { |
41 | 41 |
42 const wchar_t kHelpCenterUrl[] = | 42 const wchar_t kHelpCenterUrl[] = |
43 L"https://support.google.com/chrome/answer/150752"; | 43 L"https://support.google.com/chrome/answer/150752"; |
44 | 44 |
45 enum ButtonTags { | 45 enum ButtonTags { |
46 BT_NONE, | 46 BT_NONE, |
(...skipping 20 matching lines...) Expand all Loading... |
67 return dialog.ShowModal(listener); | 67 return dialog.ShowModal(listener); |
68 } | 68 } |
69 | 69 |
70 TryChromeDialogView::TryChromeDialogView(size_t flavor) | 70 TryChromeDialogView::TryChromeDialogView(size_t flavor) |
71 : flavor_(flavor), | 71 : flavor_(flavor), |
72 popup_(NULL), | 72 popup_(NULL), |
73 try_chrome_(NULL), | 73 try_chrome_(NULL), |
74 kill_chrome_(NULL), | 74 kill_chrome_(NULL), |
75 dont_try_chrome_(NULL), | 75 dont_try_chrome_(NULL), |
76 make_default_(NULL), | 76 make_default_(NULL), |
77 result_(COUNT) { | 77 result_(COUNT) {} |
78 } | |
79 | 78 |
80 TryChromeDialogView::~TryChromeDialogView() { | 79 TryChromeDialogView::~TryChromeDialogView() {} |
81 } | |
82 | 80 |
83 TryChromeDialogView::Result TryChromeDialogView::ShowModal( | 81 TryChromeDialogView::Result TryChromeDialogView::ShowModal( |
84 const ActiveModalDialogListener& listener) { | 82 const ActiveModalDialogListener& listener) { |
85 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 83 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
86 | 84 |
87 views::ImageView* icon = new views::ImageView(); | 85 views::ImageView* icon = new views::ImageView(); |
88 icon->SetImage(rb.GetNativeImageNamed(IDR_PRODUCT_LOGO_32).ToImageSkia()); | 86 icon->SetImage(rb.GetNativeImageNamed(IDR_PRODUCT_LOGO_32).ToImageSkia()); |
89 gfx::Size icon_size = icon->GetPreferredSize(); | 87 gfx::Size icon_size = icon->GetPreferredSize(); |
90 | 88 |
91 // An approximate window size. After Layout() we'll get better bounds. | 89 // An approximate window size. After Layout() we'll get better bounds. |
92 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP); | 90 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP); |
93 params.activatable = views::Widget::InitParams::ACTIVATABLE_YES; | 91 params.activatable = views::Widget::InitParams::ACTIVATABLE_YES; |
94 params.bounds = gfx::Rect(310, 200); | 92 params.bounds = gfx::Rect(310, 200); |
95 popup_ = new views::Widget; | 93 popup_ = new views::Widget; |
96 popup_->Init(params); | 94 popup_->Init(params); |
97 | 95 |
98 views::View* root_view = popup_->GetRootView(); | 96 views::View* root_view = popup_->GetRootView(); |
99 // The window color is a tiny bit off-white. | 97 // The window color is a tiny bit off-white. |
100 root_view->set_background( | 98 root_view->set_background( |
101 views::Background::CreateSolidBackground(0xfc, 0xfc, 0xfc)); | 99 views::Background::CreateSolidBackground(0xfc, 0xfc, 0xfc)); |
102 | 100 |
103 views::GridLayout* layout = views::GridLayout::CreatePanel(root_view); | 101 views::GridLayout* layout = views::GridLayout::CreatePanel(root_view); |
104 views::ColumnSet* columns; | 102 views::ColumnSet* columns; |
105 | 103 |
| 104 ChromeLayoutProvider* provider = ChromeLayoutProvider::Get(); |
| 105 const int label_spacing = |
| 106 provider->GetDistanceMetric(DISTANCE_RELATED_LABEL_HORIZONTAL); |
| 107 const int unrelated_space_horiz = |
| 108 provider->GetDistanceMetric(DISTANCE_UNRELATED_CONTROL_HORIZONTAL); |
| 109 const int unrelated_space_vert = |
| 110 provider->GetDistanceMetric(DISTANCE_UNRELATED_CONTROL_VERTICAL); |
| 111 const int button_spacing_horiz = |
| 112 provider->GetDistanceMetric(views::DISTANCE_RELATED_BUTTON_HORIZONTAL); |
| 113 |
106 // First row: [icon][pad][text][pad][button]. | 114 // First row: [icon][pad][text][pad][button]. |
107 columns = layout->AddColumnSet(0); | 115 columns = layout->AddColumnSet(0); |
108 columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::LEADING, 0, | 116 columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::LEADING, 0, |
109 views::GridLayout::FIXED, icon_size.width(), | 117 views::GridLayout::FIXED, icon_size.width(), |
110 icon_size.height()); | 118 icon_size.height()); |
111 columns->AddPaddingColumn(0, views::kRelatedControlHorizontalSpacing); | 119 columns->AddPaddingColumn(0, label_spacing); |
112 columns->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1, | 120 columns->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1, |
113 views::GridLayout::USE_PREF, 0, 0); | 121 views::GridLayout::USE_PREF, 0, 0); |
114 columns->AddPaddingColumn(0, views::kUnrelatedControlHorizontalSpacing); | 122 columns->AddPaddingColumn(0, unrelated_space_horiz); |
115 columns->AddColumn(views::GridLayout::TRAILING, views::GridLayout::FILL, 1, | 123 columns->AddColumn(views::GridLayout::TRAILING, views::GridLayout::FILL, 1, |
116 views::GridLayout::USE_PREF, 0, 0); | 124 views::GridLayout::USE_PREF, 0, 0); |
117 | 125 |
118 // Optional second row: [pad][pad][radio 1]. | 126 int icon_padding = icon_size.width() + label_spacing; |
| 127 // Optional second row: [pad][radio 1]. |
119 columns = layout->AddColumnSet(1); | 128 columns = layout->AddColumnSet(1); |
120 columns->AddPaddingColumn(0, icon_size.width()); | 129 columns->AddPaddingColumn(0, icon_padding); |
121 columns->AddPaddingColumn(0, views::kRelatedControlHorizontalSpacing); | |
122 columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 1, | 130 columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 1, |
123 views::GridLayout::USE_PREF, 0, 0); | 131 views::GridLayout::USE_PREF, 0, 0); |
124 | 132 |
125 // Third row: [pad][pad][radio 2]. | 133 // Third row: [pad][radio 2]. |
126 columns = layout->AddColumnSet(2); | 134 columns = layout->AddColumnSet(2); |
127 columns->AddPaddingColumn(0, icon_size.width()); | 135 columns->AddPaddingColumn(0, icon_padding); |
128 columns->AddPaddingColumn(0, views::kRelatedControlHorizontalSpacing); | |
129 columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 1, | 136 columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 1, |
130 views::GridLayout::USE_PREF, 0, 0); | 137 views::GridLayout::USE_PREF, 0, 0); |
131 | 138 |
132 // Fourth row: [pad][pad][button][pad][button]. | 139 // Fourth row: [pad][button][pad][button]. |
133 columns = layout->AddColumnSet(3); | 140 columns = layout->AddColumnSet(3); |
134 columns->AddPaddingColumn(0, icon_size.width()); | 141 columns->AddPaddingColumn(0, icon_padding); |
135 columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 0, | 142 columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 0, |
136 views::GridLayout::USE_PREF, 0, 0); | 143 views::GridLayout::USE_PREF, 0, 0); |
137 columns->AddPaddingColumn(0, views::LayoutProvider::Get()->GetDistanceMetric( | 144 columns->AddPaddingColumn(0, button_spacing_horiz); |
138 views::DISTANCE_RELATED_BUTTON_HORIZONTAL)); | |
139 columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 0, | 145 columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 0, |
140 views::GridLayout::USE_PREF, 0, 0); | 146 views::GridLayout::USE_PREF, 0, 0); |
141 | 147 |
142 // Fifth row: [pad][pad][link]. | 148 // Fifth row: [pad][link]. |
143 columns = layout->AddColumnSet(4); | 149 columns = layout->AddColumnSet(4); |
144 columns->AddPaddingColumn(0, icon_size.width()); | 150 columns->AddPaddingColumn(0, icon_padding); |
145 columns->AddPaddingColumn(0, views::kRelatedControlHorizontalSpacing); | |
146 columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 1, | 151 columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 1, |
147 views::GridLayout::USE_PREF, 0, 0); | 152 views::GridLayout::USE_PREF, 0, 0); |
148 | 153 |
149 // Optional fourth row: [button]. | 154 // Optional fourth row: [button]. |
150 columns = layout->AddColumnSet(5); | 155 columns = layout->AddColumnSet(5); |
151 columns->AddColumn(views::GridLayout::CENTER, views::GridLayout::FILL, 1, | 156 columns->AddColumn(views::GridLayout::CENTER, views::GridLayout::FILL, 1, |
152 views::GridLayout::USE_PREF, 0, 0); | 157 views::GridLayout::USE_PREF, 0, 0); |
153 | 158 |
154 // Optional fourth row: [divider] | 159 // Optional fourth row: [divider] |
155 columns = layout->AddColumnSet(6); | 160 columns = layout->AddColumnSet(6); |
156 columns->AddColumn(views::GridLayout::CENTER, views::GridLayout::FILL, 1, | 161 columns->AddColumn(views::GridLayout::CENTER, views::GridLayout::FILL, 1, |
157 views::GridLayout::USE_PREF, 0, 0); | 162 views::GridLayout::USE_PREF, 0, 0); |
158 | 163 |
159 // Optional fifth row [checkbox][pad][button] | 164 // Optional fifth row [checkbox][pad][button] |
160 columns = layout->AddColumnSet(7); | 165 columns = layout->AddColumnSet(7); |
161 columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 0, | 166 columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 0, |
162 views::GridLayout::USE_PREF, 0, 0); | 167 views::GridLayout::USE_PREF, 0, 0); |
163 columns->AddPaddingColumn(0, views::kUnrelatedControlHorizontalSpacing); | 168 columns->AddPaddingColumn(0, unrelated_space_horiz); |
164 columns->AddColumn(views::GridLayout::TRAILING, views::GridLayout::FILL, 1, | 169 columns->AddColumn(views::GridLayout::TRAILING, views::GridLayout::FILL, 1, |
165 views::GridLayout::USE_PREF, 0, 0); | 170 views::GridLayout::USE_PREF, 0, 0); |
166 | 171 |
167 // First row. | 172 // First row. |
168 layout->StartRow(0, 0); | 173 layout->StartRow(0, 0); |
169 layout->AddView(icon); | 174 layout->AddView(icon); |
170 | 175 |
171 // Find out what experiment we are conducting. | 176 // Find out what experiment we are conducting. |
172 installer::ExperimentDetails experiment; | 177 installer::ExperimentDetails experiment; |
173 if (!install_static::SupportsRetentionExperiments() || | 178 if (!install_static::SupportsRetentionExperiments() || |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 layout->AddView(kill_chrome_); | 228 layout->AddView(kill_chrome_); |
224 } | 229 } |
225 | 230 |
226 views::LabelButton* accept_button = | 231 views::LabelButton* accept_button = |
227 views::MdTextButton::CreateSecondaryUiButton( | 232 views::MdTextButton::CreateSecondaryUiButton( |
228 this, l10n_util::GetStringUTF16(IDS_OK)); | 233 this, l10n_util::GetStringUTF16(IDS_OK)); |
229 accept_button->set_tag(BT_OK_BUTTON); | 234 accept_button->set_tag(BT_OK_BUTTON); |
230 | 235 |
231 views::Separator* separator = NULL; | 236 views::Separator* separator = NULL; |
232 if (experiment.flags & installer::kToastUiMakeDefault) { | 237 if (experiment.flags & installer::kToastUiMakeDefault) { |
233 // In this flavor we have some veritical space, then a separator line | 238 // In this flavor we have some vertical space, then a separator line |
234 // and the 'make default' checkbox and the OK button on the same row. | 239 // and the 'make default' checkbox and the OK button on the same row. |
235 layout->AddPaddingRow(0, views::kUnrelatedControlVerticalSpacing); | 240 layout->AddPaddingRow(0, unrelated_space_vert); |
236 layout->StartRow(0, 6); | 241 layout->StartRow(0, 6); |
237 separator = new views::Separator(); | 242 separator = new views::Separator(); |
238 layout->AddView(separator); | 243 layout->AddView(separator); |
239 layout->AddPaddingRow(0, views::kUnrelatedControlVerticalSpacing); | 244 layout->AddPaddingRow(0, unrelated_space_vert); |
240 | 245 |
241 layout->StartRow(0, 7); | 246 layout->StartRow(0, 7); |
242 make_default_ = new views::Checkbox( | 247 make_default_ = new views::Checkbox( |
243 l10n_util::GetStringUTF16(IDS_TRY_TOAST_SET_DEFAULT)); | 248 l10n_util::GetStringUTF16(IDS_TRY_TOAST_SET_DEFAULT)); |
244 make_default_->SetChecked(true); | 249 make_default_->SetChecked(true); |
245 layout->AddView(make_default_); | 250 layout->AddView(make_default_); |
246 layout->AddView(accept_button); | 251 layout->AddView(accept_button); |
247 } else { | 252 } else { |
248 // On this other flavor there is no checkbox, the OK button and possibly | 253 // On this other flavor there is no checkbox, the OK button and possibly |
249 // the cancel button are in the same row. | 254 // the cancel button are in the same row. |
250 layout->StartRowWithPadding(0, dont_bug_me_button ? 3 : 5, 0, 10); | 255 layout->StartRowWithPadding(0, dont_bug_me_button ? 3 : 5, 0, 10); |
251 layout->AddView(accept_button); | 256 layout->AddView(accept_button); |
252 if (dont_bug_me_button) { | 257 if (dont_bug_me_button) { |
253 // The dialog needs a "Don't bug me" as a button or as a radio button, | 258 // The dialog needs a "Don't bug me" as a button or as a radio button, |
254 // this the button case. | 259 // this the button case. |
255 views::LabelButton* cancel_button = | 260 views::LabelButton* cancel_button = |
256 views::MdTextButton::CreateSecondaryUiButton( | 261 views::MdTextButton::CreateSecondaryUiButton( |
257 this, l10n_util::GetStringUTF16(IDS_TRY_TOAST_CANCEL)); | 262 this, l10n_util::GetStringUTF16(IDS_TRY_TOAST_CANCEL)); |
258 cancel_button->set_tag(BT_CLOSE_BUTTON); | 263 cancel_button->set_tag(BT_CLOSE_BUTTON); |
259 layout->AddView(cancel_button); | 264 layout->AddView(cancel_button); |
260 } | 265 } |
261 } | 266 } |
262 | 267 |
263 if (experiment.flags & installer::kToastUiWhyLink) { | 268 if (experiment.flags & installer::kToastUiWhyLink) { |
264 layout->StartRowWithPadding(0, 4, 0, 10); | 269 layout->StartRowWithPadding(0, 4, 0, 10); |
265 views::Link* link = new views::Link( | 270 views::Link* link = |
266 l10n_util::GetStringUTF16(IDS_TRY_TOAST_WHY)); | 271 new views::Link(l10n_util::GetStringUTF16(IDS_TRY_TOAST_WHY)); |
267 link->set_listener(this); | 272 link->set_listener(this); |
268 layout->AddView(link); | 273 layout->AddView(link); |
269 } | 274 } |
270 | 275 |
271 // We resize the window according to the layout manager. This takes into | 276 // We resize the window according to the layout manager. This takes into |
272 // account the differences between XP and Vista fonts and buttons. | 277 // account the differences between XP and Vista fonts and buttons. |
273 layout->Layout(root_view); | 278 layout->Layout(root_view); |
274 gfx::Size preferred = layout->GetPreferredSize(root_view); | 279 gfx::Size preferred = layout->GetPreferredSize(root_view); |
275 if (separator) { | 280 if (separator) { |
276 int separator_height = separator->GetPreferredSize().height(); | 281 int separator_height = separator->GetPreferredSize().height(); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 // |rcWork| is the work area, accounting for the visible taskbars. | 313 // |rcWork| is the work area, accounting for the visible taskbars. |
309 origin.set_x(is_RTL ? info.rcWork.left : info.rcWork.right - size.width()); | 314 origin.set_x(is_RTL ? info.rcWork.left : info.rcWork.right - size.width()); |
310 origin.set_y(info.rcWork.bottom - size.height()); | 315 origin.set_y(info.rcWork.bottom - size.height()); |
311 } | 316 } |
312 | 317 |
313 return gfx::Rect(origin, size); | 318 return gfx::Rect(origin, size); |
314 } | 319 } |
315 | 320 |
316 void TryChromeDialogView::SetToastRegion(HWND window, int w, int h) { | 321 void TryChromeDialogView::SetToastRegion(HWND window, int w, int h) { |
317 static const POINT polygon[] = { | 322 static const POINT polygon[] = { |
318 {0, 4}, {1, 2}, {2, 1}, {4, 0}, // Left side. | 323 {0, 4}, {1, 2}, {2, 1}, {4, 0}, // Left side. |
319 {w-4, 0}, {w-2, 1}, {w-1, 2}, {w, 4}, // Right side. | 324 {w - 4, 0}, {w - 2, 1}, {w - 1, 2}, {w, 4}, // Right side. |
320 {w, h}, {0, h} | 325 {w, h}, {0, h}}; |
321 }; | |
322 HRGN region = ::CreatePolygonRgn(polygon, arraysize(polygon), WINDING); | 326 HRGN region = ::CreatePolygonRgn(polygon, arraysize(polygon), WINDING); |
323 ::SetWindowRgn(window, region, FALSE); | 327 ::SetWindowRgn(window, region, FALSE); |
324 } | 328 } |
325 | 329 |
326 void TryChromeDialogView::ButtonPressed(views::Button* sender, | 330 void TryChromeDialogView::ButtonPressed(views::Button* sender, |
327 const ui::Event& event) { | 331 const ui::Event& event) { |
328 if (sender->tag() == BT_DONT_BUG_RADIO) { | 332 if (sender->tag() == BT_DONT_BUG_RADIO) { |
329 if (make_default_) { | 333 if (make_default_) { |
330 make_default_->SetChecked(false); | 334 make_default_->SetChecked(false); |
331 make_default_->SetVisible(false); | 335 make_default_->SetVisible(false); |
(...skipping 18 matching lines...) Expand all Loading... |
350 else if (dont_try_chrome_ && dont_try_chrome_->checked()) | 354 else if (dont_try_chrome_ && dont_try_chrome_->checked()) |
351 result_ = NOT_NOW; | 355 result_ = NOT_NOW; |
352 else if (kill_chrome_ && kill_chrome_->checked()) | 356 else if (kill_chrome_ && kill_chrome_->checked()) |
353 result_ = UNINSTALL_CHROME; | 357 result_ = UNINSTALL_CHROME; |
354 else | 358 else |
355 NOTREACHED() << "Unknown radio button selected"; | 359 NOTREACHED() << "Unknown radio button selected"; |
356 } | 360 } |
357 | 361 |
358 if (make_default_) { | 362 if (make_default_) { |
359 if ((result_ == TRY_CHROME) && make_default_->checked()) | 363 if ((result_ == TRY_CHROME) && make_default_->checked()) |
360 result_ = TRY_CHROME_AS_DEFAULT; | 364 result_ = TRY_CHROME_AS_DEFAULT; |
361 } | 365 } |
362 | 366 |
363 popup_->Close(); | 367 popup_->Close(); |
364 base::MessageLoop::current()->QuitWhenIdle(); | 368 base::MessageLoop::current()->QuitWhenIdle(); |
365 } | 369 } |
366 | 370 |
367 void TryChromeDialogView::LinkClicked(views::Link* source, int event_flags) { | 371 void TryChromeDialogView::LinkClicked(views::Link* source, int event_flags) { |
368 ::ShellExecuteW(NULL, L"open", kHelpCenterUrl, NULL, NULL, SW_SHOW); | 372 ::ShellExecuteW(NULL, L"open", kHelpCenterUrl, NULL, NULL, SW_SHOW); |
369 } | 373 } |
OLD | NEW |