OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/plugin_observer.h" | 5 #include "chrome/browser/plugin_observer.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/content_settings/host_content_settings_map.h" | 8 #include "chrome/browser/content_settings/host_content_settings_map.h" |
9 #include "chrome/browser/google/google_util.h" | 9 #include "chrome/browser/google/google_util.h" |
10 #include "chrome/browser/infobars/infobar_tab_helper.h" | 10 #include "chrome/browser/infobars/infobar_tab_helper.h" |
11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
12 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h" | 12 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h" |
13 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 13 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
14 #include "chrome/common/render_messages.h" | 14 #include "chrome/common/render_messages.h" |
15 #include "chrome/common/url_constants.h" | 15 #include "chrome/common/url_constants.h" |
16 #include "content/browser/renderer_host/render_view_host.h" | 16 #include "content/browser/renderer_host/render_view_host.h" |
17 #include "content/browser/tab_contents/tab_contents.h" | 17 #include "content/browser/tab_contents/tab_contents.h" |
18 #include "content/browser/user_metrics.h" | 18 #include "content/browser/user_metrics.h" |
19 #include "content/common/view_messages.h" | 19 #include "content/common/view_messages.h" |
20 #include "grit/generated_resources.h" | 20 #include "grit/generated_resources.h" |
21 #include "grit/theme_resources_standard.h" | 21 #include "grit/theme_resources_standard.h" |
22 #include "ui/base/l10n/l10n_util.h" | 22 #include "ui/base/l10n/l10n_util.h" |
23 #include "ui/base/resource/resource_bundle.h" | 23 #include "ui/base/resource/resource_bundle.h" |
24 #include "webkit/plugins/npapi/plugin_group.h" | 24 #include "webkit/plugins/npapi/plugin_group.h" |
25 #include "webkit/plugins/npapi/plugin_list.h" | |
26 #include "webkit/plugins/webplugininfo.h" | 25 #include "webkit/plugins/webplugininfo.h" |
27 | 26 |
28 namespace { | 27 namespace { |
29 | 28 |
30 // PluginInfoBarDelegate ------------------------------------------------------ | 29 // PluginInfoBarDelegate ------------------------------------------------------ |
31 | 30 |
32 class PluginInfoBarDelegate : public ConfirmInfoBarDelegate { | 31 class PluginInfoBarDelegate : public ConfirmInfoBarDelegate { |
33 public: | 32 public: |
34 PluginInfoBarDelegate(InfoBarTabHelper* infobar_helper, const string16& name); | 33 PluginInfoBarDelegate(InfoBarTabHelper* infobar_helper, const string16& name); |
35 | 34 |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 void PluginObserver::OnBlockedOutdatedPlugin(const string16& name, | 302 void PluginObserver::OnBlockedOutdatedPlugin(const string16& name, |
304 const GURL& update_url) { | 303 const GURL& update_url) { |
305 InfoBarTabHelper* infobar_helper = tab_contents_->infobar_tab_helper(); | 304 InfoBarTabHelper* infobar_helper = tab_contents_->infobar_tab_helper(); |
306 infobar_helper->AddInfoBar(update_url.is_empty() ? | 305 infobar_helper->AddInfoBar(update_url.is_empty() ? |
307 static_cast<InfoBarDelegate*>(new BlockedPluginInfoBarDelegate( | 306 static_cast<InfoBarDelegate*>(new BlockedPluginInfoBarDelegate( |
308 infobar_helper, | 307 infobar_helper, |
309 tab_contents_->profile()->GetHostContentSettingsMap(), | 308 tab_contents_->profile()->GetHostContentSettingsMap(), |
310 name)) : | 309 name)) : |
311 new OutdatedPluginInfoBarDelegate(infobar_helper, name, update_url)); | 310 new OutdatedPluginInfoBarDelegate(infobar_helper, name, update_url)); |
312 } | 311 } |
OLD | NEW |