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/plugins/plugin_infobar_delegates.h" | 5 #include "chrome/browser/plugins/plugin_infobar_delegates.h" |
6 | 6 |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/browser/content_settings/host_content_settings_map.h" | 9 #include "chrome/browser/content_settings/host_content_settings_map.h" |
10 #include "chrome/browser/google/google_util.h" | 10 #include "chrome/browser/google/google_util.h" |
| 11 #include "chrome/browser/infobars/infobar.h" |
11 #include "chrome/browser/infobars/infobar_service.h" | 12 #include "chrome/browser/infobars/infobar_service.h" |
12 #include "chrome/browser/lifetime/application_lifetime.h" | 13 #include "chrome/browser/lifetime/application_lifetime.h" |
13 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" | 14 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" |
14 #include "chrome/browser/plugins/plugin_metadata.h" | 15 #include "chrome/browser/plugins/plugin_metadata.h" |
15 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/browser/shell_integration.h" | 17 #include "chrome/browser/shell_integration.h" |
17 #include "chrome/browser/ui/browser_commands.h" | 18 #include "chrome/browser/ui/browser_commands.h" |
18 #include "chrome/common/render_messages.h" | 19 #include "chrome/common/render_messages.h" |
19 #include "chrome/common/url_constants.h" | 20 #include "chrome/common/url_constants.h" |
20 #include "content/public/browser/browser_thread.h" | 21 #include "content/public/browser/browser_thread.h" |
(...skipping 20 matching lines...) Expand all Loading... |
41 #if defined(USE_AURA) | 42 #if defined(USE_AURA) |
42 #include "ui/aura/remote_root_window_host_win.h" | 43 #include "ui/aura/remote_root_window_host_win.h" |
43 #endif | 44 #endif |
44 #endif | 45 #endif |
45 | 46 |
46 using content::UserMetricsAction; | 47 using content::UserMetricsAction; |
47 | 48 |
48 | 49 |
49 // PluginInfoBarDelegate ------------------------------------------------------ | 50 // PluginInfoBarDelegate ------------------------------------------------------ |
50 | 51 |
51 PluginInfoBarDelegate::PluginInfoBarDelegate(InfoBarService* infobar_service, | 52 PluginInfoBarDelegate::PluginInfoBarDelegate(const std::string& identifier) |
52 const std::string& identifier) | 53 : ConfirmInfoBarDelegate(), |
53 : ConfirmInfoBarDelegate(infobar_service), | |
54 identifier_(identifier) { | 54 identifier_(identifier) { |
55 } | 55 } |
56 | 56 |
57 PluginInfoBarDelegate::~PluginInfoBarDelegate() { | 57 PluginInfoBarDelegate::~PluginInfoBarDelegate() { |
58 } | 58 } |
59 | 59 |
60 bool PluginInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) { | 60 bool PluginInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) { |
61 web_contents()->OpenURL(content::OpenURLParams( | 61 web_contents()->OpenURL(content::OpenURLParams( |
62 GURL(GetLearnMoreURL()), content::Referrer(), | 62 GURL(GetLearnMoreURL()), content::Referrer(), |
63 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, | 63 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, |
(...skipping 19 matching lines...) Expand all Loading... |
83 | 83 |
84 | 84 |
85 // UnauthorizedPluginInfoBarDelegate ------------------------------------------ | 85 // UnauthorizedPluginInfoBarDelegate ------------------------------------------ |
86 | 86 |
87 // static | 87 // static |
88 void UnauthorizedPluginInfoBarDelegate::Create( | 88 void UnauthorizedPluginInfoBarDelegate::Create( |
89 InfoBarService* infobar_service, | 89 InfoBarService* infobar_service, |
90 HostContentSettingsMap* content_settings, | 90 HostContentSettingsMap* content_settings, |
91 const string16& name, | 91 const string16& name, |
92 const std::string& identifier) { | 92 const std::string& identifier) { |
93 infobar_service->AddInfoBar(scoped_ptr<InfoBarDelegate>( | 93 infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar( |
94 new UnauthorizedPluginInfoBarDelegate(infobar_service, content_settings, | 94 scoped_ptr<ConfirmInfoBarDelegate>(new UnauthorizedPluginInfoBarDelegate( |
95 name, identifier))); | 95 content_settings, name, identifier)))); |
96 | 96 |
97 content::RecordAction(UserMetricsAction("BlockedPluginInfobar.Shown")); | 97 content::RecordAction(UserMetricsAction("BlockedPluginInfobar.Shown")); |
98 std::string utf8_name(UTF16ToUTF8(name)); | 98 std::string utf8_name(UTF16ToUTF8(name)); |
99 if (utf8_name == PluginMetadata::kJavaGroupName) { | 99 if (utf8_name == PluginMetadata::kJavaGroupName) { |
100 content::RecordAction(UserMetricsAction("BlockedPluginInfobar.Shown.Java")); | 100 content::RecordAction(UserMetricsAction("BlockedPluginInfobar.Shown.Java")); |
101 } else if (utf8_name == PluginMetadata::kQuickTimeGroupName) { | 101 } else if (utf8_name == PluginMetadata::kQuickTimeGroupName) { |
102 content::RecordAction( | 102 content::RecordAction( |
103 UserMetricsAction("BlockedPluginInfobar.Shown.QuickTime")); | 103 UserMetricsAction("BlockedPluginInfobar.Shown.QuickTime")); |
104 } else if (utf8_name == PluginMetadata::kShockwaveGroupName) { | 104 } else if (utf8_name == PluginMetadata::kShockwaveGroupName) { |
105 content::RecordAction( | 105 content::RecordAction( |
106 UserMetricsAction("BlockedPluginInfobar.Shown.Shockwave")); | 106 UserMetricsAction("BlockedPluginInfobar.Shown.Shockwave")); |
107 } else if (utf8_name == PluginMetadata::kRealPlayerGroupName) { | 107 } else if (utf8_name == PluginMetadata::kRealPlayerGroupName) { |
108 content::RecordAction( | 108 content::RecordAction( |
109 UserMetricsAction("BlockedPluginInfobar.Shown.RealPlayer")); | 109 UserMetricsAction("BlockedPluginInfobar.Shown.RealPlayer")); |
110 } else if (utf8_name == PluginMetadata::kWindowsMediaPlayerGroupName) { | 110 } else if (utf8_name == PluginMetadata::kWindowsMediaPlayerGroupName) { |
111 content::RecordAction( | 111 content::RecordAction( |
112 UserMetricsAction("BlockedPluginInfobar.Shown.WindowsMediaPlayer")); | 112 UserMetricsAction("BlockedPluginInfobar.Shown.WindowsMediaPlayer")); |
113 } | 113 } |
114 } | 114 } |
115 | 115 |
116 UnauthorizedPluginInfoBarDelegate::UnauthorizedPluginInfoBarDelegate( | 116 UnauthorizedPluginInfoBarDelegate::UnauthorizedPluginInfoBarDelegate( |
117 InfoBarService* infobar_service, | |
118 HostContentSettingsMap* content_settings, | 117 HostContentSettingsMap* content_settings, |
119 const string16& name, | 118 const string16& name, |
120 const std::string& identifier) | 119 const std::string& identifier) |
121 : PluginInfoBarDelegate(infobar_service, identifier), | 120 : PluginInfoBarDelegate(identifier), |
122 content_settings_(content_settings), | 121 content_settings_(content_settings), |
123 name_(name) { | 122 name_(name) { |
124 } | 123 } |
125 | 124 |
126 UnauthorizedPluginInfoBarDelegate::~UnauthorizedPluginInfoBarDelegate() { | 125 UnauthorizedPluginInfoBarDelegate::~UnauthorizedPluginInfoBarDelegate() { |
127 content::RecordAction(UserMetricsAction("BlockedPluginInfobar.Closed")); | 126 content::RecordAction(UserMetricsAction("BlockedPluginInfobar.Closed")); |
128 } | 127 } |
129 | 128 |
130 std::string UnauthorizedPluginInfoBarDelegate::GetLearnMoreURL() const { | 129 std::string UnauthorizedPluginInfoBarDelegate::GetLearnMoreURL() const { |
131 return chrome::kBlockedPluginLearnMoreURL; | 130 return chrome::kBlockedPluginLearnMoreURL; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 | 171 |
173 // OutdatedPluginInfoBarDelegate ---------------------------------------------- | 172 // OutdatedPluginInfoBarDelegate ---------------------------------------------- |
174 | 173 |
175 void OutdatedPluginInfoBarDelegate::Create( | 174 void OutdatedPluginInfoBarDelegate::Create( |
176 InfoBarService* infobar_service, | 175 InfoBarService* infobar_service, |
177 PluginInstaller* installer, | 176 PluginInstaller* installer, |
178 scoped_ptr<PluginMetadata> plugin_metadata) { | 177 scoped_ptr<PluginMetadata> plugin_metadata) { |
179 // Copy the name out of |plugin_metadata| now, since the Pass() call below | 178 // Copy the name out of |plugin_metadata| now, since the Pass() call below |
180 // will make it impossible to get at. | 179 // will make it impossible to get at. |
181 string16 name(plugin_metadata->name()); | 180 string16 name(plugin_metadata->name()); |
182 infobar_service->AddInfoBar(scoped_ptr<InfoBarDelegate>( | 181 infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar( |
183 new OutdatedPluginInfoBarDelegate( | 182 scoped_ptr<ConfirmInfoBarDelegate>(new OutdatedPluginInfoBarDelegate( |
184 infobar_service, installer, plugin_metadata.Pass(), | 183 installer, plugin_metadata.Pass(), l10n_util::GetStringFUTF16( |
185 l10n_util::GetStringFUTF16( | |
186 (installer->state() == PluginInstaller::INSTALLER_STATE_IDLE) ? | 184 (installer->state() == PluginInstaller::INSTALLER_STATE_IDLE) ? |
187 IDS_PLUGIN_OUTDATED_PROMPT : IDS_PLUGIN_DOWNLOADING, | 185 IDS_PLUGIN_OUTDATED_PROMPT : IDS_PLUGIN_DOWNLOADING, |
188 name)))); | 186 name))))); |
189 } | 187 } |
190 | 188 |
191 OutdatedPluginInfoBarDelegate::OutdatedPluginInfoBarDelegate( | 189 OutdatedPluginInfoBarDelegate::OutdatedPluginInfoBarDelegate( |
192 InfoBarService* infobar_service, | |
193 PluginInstaller* installer, | 190 PluginInstaller* installer, |
194 scoped_ptr<PluginMetadata> plugin_metadata, | 191 scoped_ptr<PluginMetadata> plugin_metadata, |
195 const string16& message) | 192 const string16& message) |
196 : PluginInfoBarDelegate(infobar_service, plugin_metadata->identifier()), | 193 : PluginInfoBarDelegate(plugin_metadata->identifier()), |
197 WeakPluginInstallerObserver(installer), | 194 WeakPluginInstallerObserver(installer), |
198 plugin_metadata_(plugin_metadata.Pass()), | 195 plugin_metadata_(plugin_metadata.Pass()), |
199 message_(message) { | 196 message_(message) { |
200 content::RecordAction(UserMetricsAction("OutdatedPluginInfobar.Shown")); | 197 content::RecordAction(UserMetricsAction("OutdatedPluginInfobar.Shown")); |
201 std::string name = UTF16ToUTF8(plugin_metadata_->name()); | 198 std::string name = UTF16ToUTF8(plugin_metadata_->name()); |
202 if (name == PluginMetadata::kJavaGroupName) { | 199 if (name == PluginMetadata::kJavaGroupName) { |
203 content::RecordAction( | 200 content::RecordAction( |
204 UserMetricsAction("OutdatedPluginInfobar.Shown.Java")); | 201 UserMetricsAction("OutdatedPluginInfobar.Shown.Java")); |
205 } else if (name == PluginMetadata::kQuickTimeGroupName) { | 202 } else if (name == PluginMetadata::kQuickTimeGroupName) { |
206 content::RecordAction( | 203 content::RecordAction( |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 ReplaceWithInfoBar(l10n_util::GetStringFUTF16(IDS_PLUGIN_DOWNLOAD_CANCELLED, | 280 ReplaceWithInfoBar(l10n_util::GetStringFUTF16(IDS_PLUGIN_DOWNLOAD_CANCELLED, |
284 plugin_metadata_->name())); | 281 plugin_metadata_->name())); |
285 } | 282 } |
286 | 283 |
287 void OutdatedPluginInfoBarDelegate::DownloadFinished() { | 284 void OutdatedPluginInfoBarDelegate::DownloadFinished() { |
288 ReplaceWithInfoBar(l10n_util::GetStringFUTF16(IDS_PLUGIN_UPDATING, | 285 ReplaceWithInfoBar(l10n_util::GetStringFUTF16(IDS_PLUGIN_UPDATING, |
289 plugin_metadata_->name())); | 286 plugin_metadata_->name())); |
290 } | 287 } |
291 | 288 |
292 void OutdatedPluginInfoBarDelegate::OnlyWeakObserversLeft() { | 289 void OutdatedPluginInfoBarDelegate::OnlyWeakObserversLeft() { |
293 if (owner()) | 290 infobar()->RemoveSelf(); |
294 owner()->RemoveInfoBar(this); | |
295 } | 291 } |
296 | 292 |
297 void OutdatedPluginInfoBarDelegate::ReplaceWithInfoBar( | 293 void OutdatedPluginInfoBarDelegate::ReplaceWithInfoBar( |
298 const string16& message) { | 294 const string16& message) { |
299 // Return early if the message doesn't change. This is important in case the | 295 // Return early if the message doesn't change. This is important in case the |
300 // PluginInstaller is still iterating over its observers (otherwise we would | 296 // PluginInstaller is still iterating over its observers (otherwise we would |
301 // keep replacing infobar delegates infinitely). | 297 // keep replacing infobar delegates infinitely). |
302 if ((message_ == message) || !owner()) | 298 if ((message_ == message) || !infobar()->owner()) |
303 return; | 299 return; |
304 PluginInstallerInfoBarDelegate::Replace( | 300 PluginInstallerInfoBarDelegate::Replace( |
305 this, installer(), plugin_metadata_->Clone(), false, message); | 301 infobar(), installer(), plugin_metadata_->Clone(), false, message); |
306 } | 302 } |
307 | 303 |
308 | 304 |
309 // PluginInstallerInfoBarDelegate --------------------------------------------- | 305 // PluginInstallerInfoBarDelegate --------------------------------------------- |
310 | 306 |
311 void PluginInstallerInfoBarDelegate::Create( | 307 void PluginInstallerInfoBarDelegate::Create( |
312 InfoBarService* infobar_service, | 308 InfoBarService* infobar_service, |
313 PluginInstaller* installer, | 309 PluginInstaller* installer, |
314 scoped_ptr<PluginMetadata> plugin_metadata, | 310 scoped_ptr<PluginMetadata> plugin_metadata, |
315 const InstallCallback& callback) { | 311 const InstallCallback& callback) { |
316 string16 name(plugin_metadata->name()); | 312 string16 name(plugin_metadata->name()); |
317 #if defined(OS_WIN) | 313 #if defined(OS_WIN) |
318 if (base::win::IsMetroProcess()) { | 314 if (base::win::IsMetroProcess()) { |
319 PluginMetroModeInfoBarDelegate::Create( | 315 PluginMetroModeInfoBarDelegate::Create( |
320 infobar_service, PluginMetroModeInfoBarDelegate::MISSING_PLUGIN, name); | 316 infobar_service, PluginMetroModeInfoBarDelegate::MISSING_PLUGIN, name); |
321 return; | 317 return; |
322 } | 318 } |
323 #endif | 319 #endif |
324 infobar_service->AddInfoBar(scoped_ptr<InfoBarDelegate>( | 320 infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar( |
325 new PluginInstallerInfoBarDelegate( | 321 scoped_ptr<ConfirmInfoBarDelegate>(new PluginInstallerInfoBarDelegate( |
326 infobar_service, installer, plugin_metadata.Pass(), callback, true, | 322 installer, plugin_metadata.Pass(), callback, true, |
327 l10n_util::GetStringFUTF16( | 323 l10n_util::GetStringFUTF16( |
328 (installer->state() == PluginInstaller::INSTALLER_STATE_IDLE) ? | 324 (installer->state() == PluginInstaller::INSTALLER_STATE_IDLE) ? |
329 IDS_PLUGININSTALLER_INSTALLPLUGIN_PROMPT : | 325 IDS_PLUGININSTALLER_INSTALLPLUGIN_PROMPT : |
330 IDS_PLUGIN_DOWNLOADING, | 326 IDS_PLUGIN_DOWNLOADING, |
331 name)))); | 327 name))))); |
332 | |
333 } | 328 } |
334 | 329 |
| 330 |
335 void PluginInstallerInfoBarDelegate::Replace( | 331 void PluginInstallerInfoBarDelegate::Replace( |
336 InfoBarDelegate* infobar, | 332 InfoBar* infobar, |
337 PluginInstaller* installer, | 333 PluginInstaller* installer, |
338 scoped_ptr<PluginMetadata> plugin_metadata, | 334 scoped_ptr<PluginMetadata> plugin_metadata, |
339 bool new_install, | 335 bool new_install, |
340 const string16& message) { | 336 const string16& message) { |
341 DCHECK(infobar->owner()); | 337 DCHECK(infobar->owner()); |
342 infobar->owner()->ReplaceInfoBar(infobar, scoped_ptr<InfoBarDelegate>( | 338 infobar->owner()->ReplaceInfoBar(infobar, |
343 new PluginInstallerInfoBarDelegate( | 339 ConfirmInfoBarDelegate::CreateInfoBar(scoped_ptr<ConfirmInfoBarDelegate>( |
344 infobar->owner(), installer, plugin_metadata.Pass(), | 340 new PluginInstallerInfoBarDelegate( |
345 PluginInstallerInfoBarDelegate::InstallCallback(), new_install, | 341 installer, plugin_metadata.Pass(), |
346 message))); | 342 PluginInstallerInfoBarDelegate::InstallCallback(), new_install, |
| 343 message)))); |
347 } | 344 } |
348 | 345 |
349 PluginInstallerInfoBarDelegate::PluginInstallerInfoBarDelegate( | 346 PluginInstallerInfoBarDelegate::PluginInstallerInfoBarDelegate( |
350 InfoBarService* infobar_service, | |
351 PluginInstaller* installer, | 347 PluginInstaller* installer, |
352 scoped_ptr<PluginMetadata> plugin_metadata, | 348 scoped_ptr<PluginMetadata> plugin_metadata, |
353 const InstallCallback& callback, | 349 const InstallCallback& callback, |
354 bool new_install, | 350 bool new_install, |
355 const string16& message) | 351 const string16& message) |
356 : ConfirmInfoBarDelegate(infobar_service), | 352 : ConfirmInfoBarDelegate(), |
357 WeakPluginInstallerObserver(installer), | 353 WeakPluginInstallerObserver(installer), |
358 plugin_metadata_(plugin_metadata.Pass()), | 354 plugin_metadata_(plugin_metadata.Pass()), |
359 callback_(callback), | 355 callback_(callback), |
360 new_install_(new_install), | 356 new_install_(new_install), |
361 message_(message) { | 357 message_(message) { |
362 } | 358 } |
363 | 359 |
364 PluginInstallerInfoBarDelegate::~PluginInstallerInfoBarDelegate() { | 360 PluginInstallerInfoBarDelegate::~PluginInstallerInfoBarDelegate() { |
365 } | 361 } |
366 | 362 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 } | 419 } |
424 | 420 |
425 void PluginInstallerInfoBarDelegate::DownloadFinished() { | 421 void PluginInstallerInfoBarDelegate::DownloadFinished() { |
426 ReplaceWithInfoBar( | 422 ReplaceWithInfoBar( |
427 l10n_util::GetStringFUTF16( | 423 l10n_util::GetStringFUTF16( |
428 new_install_ ? IDS_PLUGIN_INSTALLING : IDS_PLUGIN_UPDATING, | 424 new_install_ ? IDS_PLUGIN_INSTALLING : IDS_PLUGIN_UPDATING, |
429 plugin_metadata_->name())); | 425 plugin_metadata_->name())); |
430 } | 426 } |
431 | 427 |
432 void PluginInstallerInfoBarDelegate::OnlyWeakObserversLeft() { | 428 void PluginInstallerInfoBarDelegate::OnlyWeakObserversLeft() { |
433 if (owner()) | 429 infobar()->RemoveSelf(); |
434 owner()->RemoveInfoBar(this); | |
435 } | 430 } |
436 | 431 |
437 void PluginInstallerInfoBarDelegate::ReplaceWithInfoBar( | 432 void PluginInstallerInfoBarDelegate::ReplaceWithInfoBar( |
438 const string16& message) { | 433 const string16& message) { |
439 // Return early if the message doesn't change. This is important in case the | 434 // Return early if the message doesn't change. This is important in case the |
440 // PluginInstaller is still iterating over its observers (otherwise we would | 435 // PluginInstaller is still iterating over its observers (otherwise we would |
441 // keep replacing infobar delegates infinitely). | 436 // keep replacing infobar delegates infinitely). |
442 if ((message_ == message) || !owner()) | 437 if ((message_ == message) || !infobar()->owner()) |
443 return; | 438 return; |
444 Replace(this, installer(), plugin_metadata_->Clone(), new_install_, message); | 439 Replace(infobar(), installer(), plugin_metadata_->Clone(), new_install_, |
| 440 message); |
445 } | 441 } |
446 | 442 |
447 | 443 |
448 #if defined(OS_WIN) | 444 #if defined(OS_WIN) |
449 | 445 |
450 // PluginMetroModeInfoBarDelegate --------------------------------------------- | 446 // PluginMetroModeInfoBarDelegate --------------------------------------------- |
451 | 447 |
452 // static | 448 // static |
453 void PluginMetroModeInfoBarDelegate::Create( | 449 void PluginMetroModeInfoBarDelegate::Create( |
454 InfoBarService* infobar_service, | 450 InfoBarService* infobar_service, |
455 PluginMetroModeInfoBarDelegate::Mode mode, | 451 PluginMetroModeInfoBarDelegate::Mode mode, |
456 const string16& name) { | 452 const string16& name) { |
457 infobar_service->AddInfoBar(scoped_ptr<InfoBarDelegate>( | 453 infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar( |
458 new PluginMetroModeInfoBarDelegate(infobar_service, mode, name))); | 454 scoped_ptr<ConfirmInfoBarDelegate>( |
| 455 new PluginMetroModeInfoBarDelegate(mode, name)))); |
459 } | 456 } |
460 | 457 |
461 PluginMetroModeInfoBarDelegate::PluginMetroModeInfoBarDelegate( | 458 PluginMetroModeInfoBarDelegate::PluginMetroModeInfoBarDelegate( |
462 InfoBarService* infobar_service, | |
463 PluginMetroModeInfoBarDelegate::Mode mode, | 459 PluginMetroModeInfoBarDelegate::Mode mode, |
464 const string16& name) | 460 const string16& name) |
465 : ConfirmInfoBarDelegate(infobar_service), | 461 : ConfirmInfoBarDelegate(), |
466 mode_(mode), | 462 mode_(mode), |
467 name_(name) { | 463 name_(name) { |
468 } | 464 } |
469 | 465 |
470 PluginMetroModeInfoBarDelegate::~PluginMetroModeInfoBarDelegate() { | 466 PluginMetroModeInfoBarDelegate::~PluginMetroModeInfoBarDelegate() { |
471 } | 467 } |
472 | 468 |
473 int PluginMetroModeInfoBarDelegate::GetIconID() const { | 469 int PluginMetroModeInfoBarDelegate::GetIconID() const { |
474 return IDR_INFOBAR_PLUGIN_INSTALL; | 470 return IDR_INFOBAR_PLUGIN_INSTALL; |
475 } | 471 } |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 "https://support.google.com/chrome/?p=ib_redirect_to_desktop"), | 525 "https://support.google.com/chrome/?p=ib_redirect_to_desktop"), |
530 content::Referrer(), | 526 content::Referrer(), |
531 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, | 527 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, |
532 content::PAGE_TRANSITION_LINK, false)); | 528 content::PAGE_TRANSITION_LINK, false)); |
533 return false; | 529 return false; |
534 } | 530 } |
535 | 531 |
536 #endif // defined(OS_WIN) | 532 #endif // defined(OS_WIN) |
537 | 533 |
538 #endif // defined(ENABLE_PLUGIN_INSTALLATION) | 534 #endif // defined(ENABLE_PLUGIN_INSTALLATION) |
OLD | NEW |