diff options
-rw-r--r-- | chrome/browser/plugin_service.cc | 6 | ||||
-rw-r--r-- | chrome/common/chrome_paths.cc | 5 | ||||
-rw-r--r-- | chrome/renderer/pepper_scrollbar_widget.cc | 7 | ||||
-rw-r--r-- | webkit/glue/plugins/plugin_lib_mac.mm | 8 |
4 files changed, 10 insertions, 16 deletions
diff --git a/chrome/browser/plugin_service.cc b/chrome/browser/plugin_service.cc index 5a77ee2..6a390d0 100644 --- a/chrome/browser/plugin_service.cc +++ b/chrome/browser/plugin_service.cc @@ -51,7 +51,13 @@ static void NotifyPluginsOfActivation() { // static bool PluginService::enable_chrome_plugins_ = true; +// Disable on Windows by default initially, but not on other platforms since +// there's no alternative there at this point. +#if defined(OS_WIN) bool PluginService::enable_internal_pdf_ = false; +#else +bool PluginService::enable_internal_pdf_ = true; +#endif // static void PluginService::InitGlobalInstance(Profile* profile) { diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc index 2b98e80..5b517a1 100644 --- a/chrome/common/chrome_paths.cc +++ b/chrome/common/chrome_paths.cc @@ -237,13 +237,12 @@ bool PathProvider(int key, FilePath* result) { return false; break; case chrome::FILE_PDF_PLUGIN: - if (!PathService::Get(base::DIR_MODULE, &cur)) + if (!GetInternalPluginsDirectory(&cur)) return false; #if defined(OS_WIN) cur = cur.Append(FILE_PATH_LITERAL("pdf.dll")); #elif defined(OS_MACOSX) - // http://crbug.com/44900 - return false; + cur = cur.Append(FILE_PATH_LITERAL("PDF.plugin")); #else // Linux and Chrome OS cur = cur.Append(FILE_PATH_LITERAL("libpdf.so")); #endif diff --git a/chrome/renderer/pepper_scrollbar_widget.cc b/chrome/renderer/pepper_scrollbar_widget.cc index ba5b89a..2ff93a7 100644 --- a/chrome/renderer/pepper_scrollbar_widget.cc +++ b/chrome/renderer/pepper_scrollbar_widget.cc @@ -13,6 +13,7 @@ #include "skia/ext/platform_device.h" #include "third_party/WebKit/WebKit/chromium/public/WebScrollbar.h" #include "webkit/glue/plugins/plugin_instance.h" +#include "webkit/glue/webkit_glue.h" using WebKit::WebInputEvent; using WebKit::WebKeyboardEvent; @@ -123,11 +124,7 @@ void PepperScrollbarWidget::Paint(Graphics2DDeviceContext* context, const NPRect& dirty) { gfx::Rect rect(dirty.left, dirty.top, dirty.right - dirty.left, dirty.bottom - dirty.top); -#if defined(OS_WIN) || defined(OS_LINUX) - scrollbar_->paint(context->canvas(), rect); -#elif defined(OS_MACOSX) - // TODO(port) -#endif + scrollbar_->paint(webkit_glue::ToWebCanvas(context->canvas()), rect); dirty_rect_ = dirty_rect_.Subtract(rect); } diff --git a/webkit/glue/plugins/plugin_lib_mac.mm b/webkit/glue/plugins/plugin_lib_mac.mm index b6ced70..7f24a3be 100644 --- a/webkit/glue/plugins/plugin_lib_mac.mm +++ b/webkit/glue/plugins/plugin_lib_mac.mm @@ -89,10 +89,6 @@ bool ReadPlistPluginInfo(const FilePath& filename, CFBundleRef bundle, WebPluginMimeType mime; mime.mime_type = base::SysNSStringToUTF8([mime_type lowercaseString]); -#ifndef OS_MACOSX_ALLOW_PDF_LOADING - if (mime.mime_type == "application/pdf") - continue; -#endif if (mime_desc) mime.description = base::SysNSStringToWide(mime_desc); for (NSString* ext in mime_exts) @@ -194,10 +190,6 @@ bool ReadSTRPluginInfo(const FilePath& filename, CFBundleRef bundle, for (size_t i = 0; i < num_types; ++i) { WebPluginMimeType mime; mime.mime_type = StringToLowerASCII(type_strings[2*i]); -#ifndef OS_MACOSX_ALLOW_PDF_LOADING - if (mime.mime_type == "application/pdf") - continue; -#endif if (have_type_descs && i < type_descs.size()) mime.description = UTF8ToWide(type_descs[i]); SplitString(StringToLowerASCII(type_strings[2*i+1]), ',', |