| 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/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "chrome/browser/api/infobars/infobar_service.h" | 8 #include "chrome/browser/api/infobars/infobar_service.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" |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 break; | 169 break; |
| 170 } | 170 } |
| 171 return new OutdatedPluginInfoBarDelegate( | 171 return new OutdatedPluginInfoBarDelegate( |
| 172 observer, installer, message); | 172 observer, installer, message); |
| 173 } | 173 } |
| 174 | 174 |
| 175 OutdatedPluginInfoBarDelegate::OutdatedPluginInfoBarDelegate( | 175 OutdatedPluginInfoBarDelegate::OutdatedPluginInfoBarDelegate( |
| 176 PluginObserver* observer, | 176 PluginObserver* observer, |
| 177 PluginInstaller* installer, | 177 PluginInstaller* installer, |
| 178 const string16& message) | 178 const string16& message) |
| 179 : PluginInfoBarDelegate(InfoBarService::ForTab(observer->tab_contents()), | 179 : PluginInfoBarDelegate( |
| 180 InfoBarService::FromTabContents(observer->tab_contents()), |
| 180 installer->name(), | 181 installer->name(), |
| 181 installer->identifier()), | 182 installer->identifier()), |
| 182 WeakPluginInstallerObserver(installer), | 183 WeakPluginInstallerObserver(installer), |
| 183 observer_(observer), | 184 observer_(observer), |
| 184 message_(message) { | 185 message_(message) { |
| 185 content::RecordAction(UserMetricsAction("OutdatedPluginInfobar.Shown")); | 186 content::RecordAction(UserMetricsAction("OutdatedPluginInfobar.Shown")); |
| 186 std::string name = UTF16ToUTF8(installer->name()); | 187 std::string name = UTF16ToUTF8(installer->name()); |
| 187 if (name == webkit::npapi::PluginGroup::kJavaGroupName) | 188 if (name == webkit::npapi::PluginGroup::kJavaGroupName) |
| 188 content::RecordAction( | 189 content::RecordAction( |
| 189 UserMetricsAction("OutdatedPluginInfobar.Shown.Java")); | 190 UserMetricsAction("OutdatedPluginInfobar.Shown.Java")); |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 "https://support.google.com/chrome/?ib_display_in_desktop")); | 483 "https://support.google.com/chrome/?ib_display_in_desktop")); |
| 483 OpenURLParams params( | 484 OpenURLParams params( |
| 484 url, Referrer(), | 485 url, Referrer(), |
| 485 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, | 486 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, |
| 486 content::PAGE_TRANSITION_LINK, false); | 487 content::PAGE_TRANSITION_LINK, false); |
| 487 owner()->GetWebContents()->OpenURL(params); | 488 owner()->GetWebContents()->OpenURL(params); |
| 488 return false; | 489 return false; |
| 489 } | 490 } |
| 490 #endif // defined(OS_WIN) | 491 #endif // defined(OS_WIN) |
| 491 #endif // defined(ENABLE_PLUGIN_INSTALLATION) | 492 #endif // defined(ENABLE_PLUGIN_INSTALLATION) |
| OLD | NEW |