| 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/ui/pdf/pdf_unsupported_feature.h" | 5 #include "chrome/browser/ui/pdf/pdf_unsupported_feature.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "base/version.h" | 10 #include "base/version.h" |
| 11 #include "chrome/browser/chrome_plugin_service_filter.h" | 11 #include "chrome/browser/chrome_plugin_service_filter.h" |
| 12 #include "chrome/browser/infobars/infobar_tab_helper.h" | 12 #include "chrome/browser/infobars/infobar_tab_helper.h" |
| 13 #include "chrome/browser/plugin_prefs.h" | 13 #include "chrome/browser/plugin_prefs.h" |
| 14 #include "chrome/browser/prefs/pref_service.h" | 14 #include "chrome/browser/prefs/pref_service.h" |
| 15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
| 16 #include "chrome/browser/tab_contents/chrome_interstitial_page.h" | 16 #include "chrome/browser/tab_contents/chrome_interstitial_page.h" |
| 17 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h" | 17 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h" |
| 18 #include "chrome/browser/tab_contents/tab_util.h" | 18 #include "chrome/browser/tab_contents/tab_util.h" |
| 19 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 19 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 20 #include "chrome/common/chrome_content_client.h" | 20 #include "chrome/common/chrome_content_client.h" |
| 21 #include "chrome/common/jstemplate_builder.h" | 21 #include "chrome/common/jstemplate_builder.h" |
| 22 #include "chrome/common/pref_names.h" | 22 #include "chrome/common/pref_names.h" |
| 23 #include "content/browser/plugin_service.h" | |
| 24 #include "content/browser/renderer_host/render_view_host.h" | 23 #include "content/browser/renderer_host/render_view_host.h" |
| 25 #include "content/browser/tab_contents/tab_contents.h" | 24 #include "content/browser/tab_contents/tab_contents.h" |
| 25 #include "content/public/browser/plugin_service.h" |
| 26 #include "content/public/browser/user_metrics.h" | 26 #include "content/public/browser/user_metrics.h" |
| 27 #include "grit/browser_resources.h" | 27 #include "grit/browser_resources.h" |
| 28 #include "grit/generated_resources.h" | 28 #include "grit/generated_resources.h" |
| 29 #include "grit/theme_resources_standard.h" | 29 #include "grit/theme_resources_standard.h" |
| 30 #include "ui/base/l10n/l10n_util.h" | 30 #include "ui/base/l10n/l10n_util.h" |
| 31 #include "ui/base/resource/resource_bundle.h" | 31 #include "ui/base/resource/resource_bundle.h" |
| 32 #include "ui/gfx/image/image.h" | 32 #include "ui/gfx/image/image.h" |
| 33 #include "webkit/plugins/npapi/plugin_group.h" | 33 #include "webkit/plugins/npapi/plugin_group.h" |
| 34 | 34 |
| 35 using content::PluginService; |
| 35 using content::UserMetricsAction; | 36 using content::UserMetricsAction; |
| 36 using webkit::npapi::PluginGroup; | 37 using webkit::npapi::PluginGroup; |
| 37 using webkit::WebPluginInfo; | 38 using webkit::WebPluginInfo; |
| 38 | 39 |
| 39 namespace { | 40 namespace { |
| 40 | 41 |
| 41 // Only launch Adobe Reader X or later. | 42 // Only launch Adobe Reader X or later. |
| 42 static const uint16 kMinReaderVersionToUse = 10; | 43 static const uint16 kMinReaderVersionToUse = 10; |
| 43 | 44 |
| 44 static const char kReaderUpdateUrl[] = | 45 static const char kReaderUpdateUrl[] = |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 // Only works for Windows for now. For Mac, we'll have to launch the file | 401 // Only works for Windows for now. For Mac, we'll have to launch the file |
| 401 // externally since Adobe Reader doesn't work inside Chrome. | 402 // externally since Adobe Reader doesn't work inside Chrome. |
| 402 return; | 403 return; |
| 403 #endif | 404 #endif |
| 404 | 405 |
| 405 PluginService::GetInstance()->GetPluginGroups( | 406 PluginService::GetInstance()->GetPluginGroups( |
| 406 base::Bind(&GotPluginGroupsCallback, | 407 base::Bind(&GotPluginGroupsCallback, |
| 407 tab->tab_contents()->render_view_host()->process()->GetID(), | 408 tab->tab_contents()->render_view_host()->process()->GetID(), |
| 408 tab->tab_contents()->render_view_host()->routing_id())); | 409 tab->tab_contents()->render_view_host()->routing_id())); |
| 409 } | 410 } |
| OLD | NEW |