summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorjabdelmalek@google.com <jabdelmalek@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-26 18:17:48 +0000
committerjabdelmalek@google.com <jabdelmalek@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-26 18:17:48 +0000
commitc8e336ae83a60fb80872f1eeef5c1ca3742054b1 (patch)
treefa427622bab6aae4a3f2a489a203666375c5ec34 /chrome
parent2318c41495401b66857b659909bfee65a851f00c (diff)
downloadchromium_src-c8e336ae83a60fb80872f1eeef5c1ca3742054b1.zip
chromium_src-c8e336ae83a60fb80872f1eeef5c1ca3742054b1.tar.gz
chromium_src-c8e336ae83a60fb80872f1eeef5c1ca3742054b1.tar.bz2
Get the internal plugin working on Mac.
Review URL: http://codereview.chromium.org/2271002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48296 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/plugin_service.cc6
-rw-r--r--chrome/common/chrome_paths.cc5
-rw-r--r--chrome/renderer/pepper_scrollbar_widget.cc7
3 files changed, 10 insertions, 8 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);
}