| 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_observer.h" | 5 #include "chrome/browser/plugins/plugin_observer.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/debug/crash_logging.h" | 9 #include "base/debug/crash_logging.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 content::NavigationController* controller_; | 143 content::NavigationController* controller_; |
| 144 base::string16 message_; | 144 base::string16 message_; |
| 145 }; | 145 }; |
| 146 | 146 |
| 147 // static | 147 // static |
| 148 void ReloadPluginInfoBarDelegate::Create( | 148 void ReloadPluginInfoBarDelegate::Create( |
| 149 InfoBarService* infobar_service, | 149 InfoBarService* infobar_service, |
| 150 content::NavigationController* controller, | 150 content::NavigationController* controller, |
| 151 const base::string16& message) { | 151 const base::string16& message) { |
| 152 infobar_service->AddInfoBar( | 152 infobar_service->AddInfoBar( |
| 153 ConfirmInfoBarDelegate::CreateInfoBar(scoped_ptr<ConfirmInfoBarDelegate>( | 153 infobar_service->CreateConfirmInfoBar(scoped_ptr<ConfirmInfoBarDelegate>( |
| 154 new ReloadPluginInfoBarDelegate(controller, message)))); | 154 new ReloadPluginInfoBarDelegate(controller, message)))); |
| 155 } | 155 } |
| 156 | 156 |
| 157 ReloadPluginInfoBarDelegate::ReloadPluginInfoBarDelegate( | 157 ReloadPluginInfoBarDelegate::ReloadPluginInfoBarDelegate( |
| 158 content::NavigationController* controller, | 158 content::NavigationController* controller, |
| 159 const base::string16& message) | 159 const base::string16& message) |
| 160 : controller_(controller), | 160 : controller_(controller), |
| 161 message_(message) {} | 161 message_(message) {} |
| 162 | 162 |
| 163 ReloadPluginInfoBarDelegate::~ReloadPluginInfoBarDelegate(){ } | 163 ReloadPluginInfoBarDelegate::~ReloadPluginInfoBarDelegate(){ } |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 scoped_ptr<PluginMetadata> plugin; | 480 scoped_ptr<PluginMetadata> plugin; |
| 481 bool ret = PluginFinder::GetInstance()->FindPluginWithIdentifier( | 481 bool ret = PluginFinder::GetInstance()->FindPluginWithIdentifier( |
| 482 identifier, NULL, &plugin); | 482 identifier, NULL, &plugin); |
| 483 DCHECK(ret); | 483 DCHECK(ret); |
| 484 | 484 |
| 485 PluginMetroModeInfoBarDelegate::Create( | 485 PluginMetroModeInfoBarDelegate::Create( |
| 486 InfoBarService::FromWebContents(web_contents()), | 486 InfoBarService::FromWebContents(web_contents()), |
| 487 PluginMetroModeInfoBarDelegate::DESKTOP_MODE_REQUIRED, plugin->name()); | 487 PluginMetroModeInfoBarDelegate::DESKTOP_MODE_REQUIRED, plugin->name()); |
| 488 #endif | 488 #endif |
| 489 } | 489 } |
| OLD | NEW |