summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/tab_contents/render_view_context_menu_mac.h4
-rw-r--r--chrome/browser/tab_contents/render_view_context_menu_mac.mm6
-rw-r--r--chrome/common/net/gaia/gaia_auth_fetcher_unittest.cc33
-rw-r--r--chrome/common/net/gaia/gaia_auth_fetcher_unittest.h27
-rw-r--r--printing/pdf_metafile_mac.cc2
-rw-r--r--printing/pdf_metafile_mac.h2
-rw-r--r--skia/ext/bitmap_platform_device_mac.cc8
-rw-r--r--skia/ext/bitmap_platform_device_mac.h6
-rw-r--r--webkit/plugins/npapi/plugin_instance.h10
-rw-r--r--webkit/plugins/npapi/plugin_instance_mac.mm10
-rw-r--r--webkit/plugins/npapi/webplugin.cc6
-rw-r--r--webkit/plugins/npapi/webplugin.h2
-rw-r--r--webkit/plugins/ppapi/mock_resource.cc13
-rw-r--r--webkit/plugins/ppapi/mock_resource.h2
-rw-r--r--webkit/tools/test_shell/test_shell.gypi1
15 files changed, 91 insertions, 41 deletions
diff --git a/chrome/browser/tab_contents/render_view_context_menu_mac.h b/chrome/browser/tab_contents/render_view_context_menu_mac.h
index 58a8eaf..b537db4 100644
--- a/chrome/browser/tab_contents/render_view_context_menu_mac.h
+++ b/chrome/browser/tab_contents/render_view_context_menu_mac.h
@@ -29,9 +29,7 @@ class RenderViewContextMenuMac : public RenderViewContextMenu {
virtual void PlatformInit();
virtual bool GetAcceleratorForCommandId(
int command_id,
- ui::Accelerator* accelerator) {
- return false;
- }
+ ui::Accelerator* accelerator);
virtual void LookUpInDictionary();
diff --git a/chrome/browser/tab_contents/render_view_context_menu_mac.mm b/chrome/browser/tab_contents/render_view_context_menu_mac.mm
index ef0cf60..13301cb 100644
--- a/chrome/browser/tab_contents/render_view_context_menu_mac.mm
+++ b/chrome/browser/tab_contents/render_view_context_menu_mac.mm
@@ -59,6 +59,12 @@ void RenderViewContextMenuMac::PlatformInit() {
}
}
+bool RenderViewContextMenuMac::GetAcceleratorForCommandId(
+ int command_id,
+ ui::Accelerator* accelerator) {
+ return false;
+}
+
void RenderViewContextMenuMac::InitPlatformMenu() {
bool has_selection = !params_.selection_text.empty();
diff --git a/chrome/common/net/gaia/gaia_auth_fetcher_unittest.cc b/chrome/common/net/gaia/gaia_auth_fetcher_unittest.cc
index 0830766..5815a3f 100644
--- a/chrome/common/net/gaia/gaia_auth_fetcher_unittest.cc
+++ b/chrome/common/net/gaia/gaia_auth_fetcher_unittest.cc
@@ -25,6 +25,39 @@
using ::testing::_;
+MockFetcher::MockFetcher(bool success,
+ const GURL& url,
+ const std::string& results,
+ URLFetcher::RequestType request_type,
+ URLFetcher::Delegate* d)
+ : URLFetcher(url, request_type, d),
+ success_(success),
+ url_(url),
+ results_(results) {}
+
+MockFetcher::~MockFetcher() {}
+
+void MockFetcher::Start() {
+ net::URLRequestStatus::Status code;
+ int http_code;
+ if (success_) {
+ http_code = RC_REQUEST_OK;
+ code = net::URLRequestStatus::SUCCESS;
+ } else {
+ http_code = RC_FORBIDDEN;
+ code = net::URLRequestStatus::FAILED;
+ }
+
+ net::URLRequestStatus status(code, 0);
+ delegate()->OnURLFetchComplete(NULL,
+ url_,
+ status,
+ http_code,
+ ResponseCookies(),
+ results_);
+}
+
+
class GaiaAuthFetcherTest : public testing::Test {
public:
GaiaAuthFetcherTest()
diff --git a/chrome/common/net/gaia/gaia_auth_fetcher_unittest.h b/chrome/common/net/gaia/gaia_auth_fetcher_unittest.h
index 65235b1..3346562 100644
--- a/chrome/common/net/gaia/gaia_auth_fetcher_unittest.h
+++ b/chrome/common/net/gaia/gaia_auth_fetcher_unittest.h
@@ -23,33 +23,12 @@ class MockFetcher : public URLFetcher {
const GURL& url,
const std::string& results,
URLFetcher::RequestType request_type,
- URLFetcher::Delegate* d)
- : URLFetcher(url, request_type, d),
- success_(success),
- url_(url),
- results_(results) {}
+ URLFetcher::Delegate* d);
- ~MockFetcher() {}
+ virtual ~MockFetcher();
- void Start() {
- net::URLRequestStatus::Status code;
- int http_code;
- if (success_) {
- http_code = RC_REQUEST_OK;
- code = net::URLRequestStatus::SUCCESS;
- } else {
- http_code = RC_FORBIDDEN;
- code = net::URLRequestStatus::FAILED;
- }
+ virtual void Start();
- net::URLRequestStatus status(code, 0);
- delegate()->OnURLFetchComplete(NULL,
- url_,
- status,
- http_code,
- ResponseCookies(),
- results_);
- }
private:
bool success_;
GURL url_;
diff --git a/printing/pdf_metafile_mac.cc b/printing/pdf_metafile_mac.cc
index e414181..ffd80e8 100644
--- a/printing/pdf_metafile_mac.cc
+++ b/printing/pdf_metafile_mac.cc
@@ -18,6 +18,8 @@ PdfMetafile::PdfMetafile()
: page_is_open_(false) {
}
+PdfMetafile::~PdfMetafile() {}
+
CGContextRef PdfMetafile::Init() {
// Ensure that Init hasn't already been called.
DCHECK(!context_.get());
diff --git a/printing/pdf_metafile_mac.h b/printing/pdf_metafile_mac.h
index 38be634..557b008 100644
--- a/printing/pdf_metafile_mac.h
+++ b/printing/pdf_metafile_mac.h
@@ -29,7 +29,7 @@ class PdfMetafile {
// Init(const void*, uint32).
PdfMetafile();
- ~PdfMetafile() {}
+ ~PdfMetafile();
// Initializes a new metafile, and returns a drawing context for rendering
// into the PDF. Returns NULL on failure.
diff --git a/skia/ext/bitmap_platform_device_mac.cc b/skia/ext/bitmap_platform_device_mac.cc
index 8435dbe..5a25abf 100644
--- a/skia/ext/bitmap_platform_device_mac.cc
+++ b/skia/ext/bitmap_platform_device_mac.cc
@@ -201,6 +201,10 @@ BitmapPlatformDevice::~BitmapPlatformDevice() {
data_->unref();
}
+SkDeviceFactory* BitmapPlatformDevice::getDeviceFactory() {
+ return SkNEW(BitmapPlatformDeviceFactory);
+}
+
BitmapPlatformDevice& BitmapPlatformDevice::operator=(
const BitmapPlatformDevice& other) {
data_ = other.data_;
@@ -249,6 +253,10 @@ void BitmapPlatformDevice::DrawToContext(CGContextRef context, int x, int y,
data_->ReleaseBitmapContext();
}
+bool BitmapPlatformDevice::IsVectorial() {
+ return false;
+}
+
// Returns the color value at the specified location.
SkColor BitmapPlatformDevice::getColorAt(int x, int y) {
const SkBitmap& bitmap = accessBitmap(true);
diff --git a/skia/ext/bitmap_platform_device_mac.h b/skia/ext/bitmap_platform_device_mac.h
index 20d8918..5723c85 100644
--- a/skia/ext/bitmap_platform_device_mac.h
+++ b/skia/ext/bitmap_platform_device_mac.h
@@ -58,9 +58,7 @@ class BitmapPlatformDevice : public PlatformDevice {
BitmapPlatformDevice(const BitmapPlatformDevice& other);
virtual ~BitmapPlatformDevice();
- virtual SkDeviceFactory* getDeviceFactory() {
- return SkNEW(BitmapPlatformDeviceFactory);
- }
+ virtual SkDeviceFactory* getDeviceFactory();
// See warning for copy constructor above.
BitmapPlatformDevice& operator=(const BitmapPlatformDevice& other);
@@ -71,7 +69,7 @@ class BitmapPlatformDevice : public PlatformDevice {
virtual void DrawToContext(CGContextRef context, int x, int y,
const CGRect* src_rect);
virtual void makeOpaque(int x, int y, int width, int height);
- virtual bool IsVectorial() { return false; }
+ virtual bool IsVectorial();
// Returns the color value at the specified location. This does not
// consider any transforms that may be set on the device.
diff --git a/webkit/plugins/npapi/plugin_instance.h b/webkit/plugins/npapi/plugin_instance.h
index a30303f..f809ffb 100644
--- a/webkit/plugins/npapi/plugin_instance.h
+++ b/webkit/plugins/npapi/plugin_instance.h
@@ -355,13 +355,9 @@ class PluginInstance : public base::RefCountedThreadSafe<PluginInstance> {
// lifetime of the object, then NULL when it goes out of scope.
class ScopedCurrentPluginEvent {
public:
- ScopedCurrentPluginEvent(PluginInstance* instance, NPCocoaEvent* event)
- : instance_(instance) {
- instance_->set_currently_handled_event(event);
- }
- ~ScopedCurrentPluginEvent() {
- instance_->set_currently_handled_event(NULL);
- }
+ ScopedCurrentPluginEvent(PluginInstance* instance, NPCocoaEvent* event);
+ ~ScopedCurrentPluginEvent();
+
private:
scoped_refptr<PluginInstance> instance_;
DISALLOW_COPY_AND_ASSIGN(ScopedCurrentPluginEvent);
diff --git a/webkit/plugins/npapi/plugin_instance_mac.mm b/webkit/plugins/npapi/plugin_instance_mac.mm
index bbcef8a..05dd46e 100644
--- a/webkit/plugins/npapi/plugin_instance_mac.mm
+++ b/webkit/plugins/npapi/plugin_instance_mac.mm
@@ -130,5 +130,15 @@ NPError PluginInstance::PopUpContextMenu(NPMenu* menu) {
return return_val;
}
+ScopedCurrentPluginEvent::ScopedCurrentPluginEvent(PluginInstance* instance,
+ NPCocoaEvent* event)
+ : instance_(instance) {
+ instance_->set_currently_handled_event(event);
+}
+
+ScopedCurrentPluginEvent::~ScopedCurrentPluginEvent() {
+ instance_->set_currently_handled_event(NULL);
+}
+
} // namespace npapi
} // namespace webkit
diff --git a/webkit/plugins/npapi/webplugin.cc b/webkit/plugins/npapi/webplugin.cc
index cfe2ff1..bf0d65b 100644
--- a/webkit/plugins/npapi/webplugin.cc
+++ b/webkit/plugins/npapi/webplugin.cc
@@ -25,6 +25,12 @@ bool WebPluginGeometry::Equals(const WebPluginGeometry& rhs) const {
visible == rhs.visible;
}
+#if defined(OS_MACOSX)
+WebPluginAcceleratedSurface* WebPlugin::GetAcceleratedSurface() {
+ return NULL;
+}
+#endif
+
WebPluginDelegate* WebPlugin::delegate() {
return NULL;
}
diff --git a/webkit/plugins/npapi/webplugin.h b/webkit/plugins/npapi/webplugin.h
index faf9a70..4a89e43 100644
--- a/webkit/plugins/npapi/webplugin.h
+++ b/webkit/plugins/npapi/webplugin.h
@@ -166,7 +166,7 @@ class WebPlugin {
virtual void BindFakePluginWindowHandle(bool opaque) {}
// Returns the accelerated surface abstraction for accelerated plugins.
- virtual WebPluginAcceleratedSurface* GetAcceleratedSurface() { return NULL; }
+ virtual WebPluginAcceleratedSurface* GetAcceleratedSurface();
#endif
// Gets the WebPluginDelegate that implements the interface.
diff --git a/webkit/plugins/ppapi/mock_resource.cc b/webkit/plugins/ppapi/mock_resource.cc
new file mode 100644
index 0000000..4b1d666
--- /dev/null
+++ b/webkit/plugins/ppapi/mock_resource.cc
@@ -0,0 +1,13 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "webkit/plugins/ppapi/mock_resource.h"
+
+namespace webkit {
+namespace ppapi {
+
+MockResource* MockResource::AsMockResource() { return this; }
+
+} // namespace ppapi
+} // namespace webkit
diff --git a/webkit/plugins/ppapi/mock_resource.h b/webkit/plugins/ppapi/mock_resource.h
index 2aa7366..cd84556 100644
--- a/webkit/plugins/ppapi/mock_resource.h
+++ b/webkit/plugins/ppapi/mock_resource.h
@@ -18,7 +18,7 @@ class MockResource : public Resource {
MockResource(PluginInstance* instance) : Resource(instance) {}
virtual ~MockResource() {}
- virtual MockResource* AsMockResource() { return this; }
+ virtual MockResource* AsMockResource();
};
} // namespace ppapi
diff --git a/webkit/tools/test_shell/test_shell.gypi b/webkit/tools/test_shell/test_shell.gypi
index 84f094b..c75ef26 100644
--- a/webkit/tools/test_shell/test_shell.gypi
+++ b/webkit/tools/test_shell/test_shell.gypi
@@ -415,6 +415,7 @@
'../../plugins/ppapi/callbacks_unittest.cc',
'../../plugins/ppapi/mock_plugin_delegate.cc',
'../../plugins/ppapi/mock_plugin_delegate.h',
+ '../../plugins/ppapi/mock_resource.cc',
'../../plugins/ppapi/mock_resource.h',
'../../plugins/ppapi/ppapi_unittest.cc',
'../../plugins/ppapi/ppapi_unittest.h',