diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-02 01:16:46 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-02 01:16:46 +0000 |
commit | 09fb387aa28e997593d5d5c11cf4a5fb12258217 (patch) | |
tree | 18c92d7099ac4ca248ee5e2061aa3ea82b111eb7 /webkit/support | |
parent | 06aca52af687c5d55794a56aa9e3d625ce6ea8ea (diff) | |
download | chromium_src-09fb387aa28e997593d5d5c11cf4a5fb12258217.zip chromium_src-09fb387aa28e997593d5d5c11cf4a5fb12258217.tar.gz chromium_src-09fb387aa28e997593d5d5c11cf4a5fb12258217.tar.bz2 |
Cleanup everything but net/ for our first clang plugins.
BUG=none
TEST=compiles
Review URL: http://codereview.chromium.org/6250088
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73396 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/support')
-rw-r--r-- | webkit/support/test_webkit_client.h | 4 | ||||
-rw-r--r-- | webkit/support/test_webplugin_page_delegate.cc | 27 | ||||
-rw-r--r-- | webkit/support/test_webplugin_page_delegate.h | 11 | ||||
-rw-r--r-- | webkit/support/webkit_support.gypi | 1 | ||||
-rw-r--r-- | webkit/support/weburl_loader_mock_factory.cc | 9 | ||||
-rw-r--r-- | webkit/support/weburl_loader_mock_factory.h | 9 |
6 files changed, 44 insertions, 17 deletions
diff --git a/webkit/support/test_webkit_client.h b/webkit/support/test_webkit_client.h index 93bb693..dfe7acf 100644 --- a/webkit/support/test_webkit_client.h +++ b/webkit/support/test_webkit_client.h @@ -24,7 +24,7 @@ class TestWebKitClient : public webkit_glue::WebKitClientImpl { virtual ~TestWebKitClient(); virtual WebKit::WebMimeRegistry* mimeRegistry(); - WebKit::WebClipboard* clipboard(); + virtual WebKit::WebClipboard* clipboard(); virtual WebKit::WebFileUtilities* fileUtilities(); virtual WebKit::WebSandboxSupport* sandboxSupport(); virtual WebKit::WebCookieJar* cookieJar(); @@ -58,7 +58,7 @@ class TestWebKitClient : public webkit_glue::WebKitClientImpl { virtual WebKit::WebStorageNamespace* createLocalStorageNamespace( const WebKit::WebString& path, unsigned quota); - void dispatchStorageEvent(const WebKit::WebString& key, + virtual void dispatchStorageEvent(const WebKit::WebString& key, const WebKit::WebString& old_value, const WebKit::WebString& new_value, const WebKit::WebString& origin, const WebKit::WebURL& url, bool is_local_storage); diff --git a/webkit/support/test_webplugin_page_delegate.cc b/webkit/support/test_webplugin_page_delegate.cc new file mode 100644 index 0000000..3725430 --- /dev/null +++ b/webkit/support/test_webplugin_page_delegate.cc @@ -0,0 +1,27 @@ +// Copyright (c) 2010 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/support/test_webplugin_page_delegate.h" + +#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebKitClient.h" + +namespace webkit_support { + +webkit::npapi::WebPluginDelegate* +TestWebPluginPageDelegate::CreatePluginDelegate( + const FilePath& file_path, + const std::string& mime_type) { + // We don't need a valid native window handle in layout tests. + // So just passing 0. + return webkit::npapi::WebPluginDelegateImpl::Create( + file_path, mime_type, 0); +} + +WebKit::WebCookieJar* TestWebPluginPageDelegate::GetCookieJar() { + return WebKit::webKitClient()->cookieJar(); +} + +} // namespace webkit_support + diff --git a/webkit/support/test_webplugin_page_delegate.h b/webkit/support/test_webplugin_page_delegate.h index 1b4df88..035f335 100644 --- a/webkit/support/test_webplugin_page_delegate.h +++ b/webkit/support/test_webplugin_page_delegate.h @@ -19,12 +19,7 @@ class TestWebPluginPageDelegate : public webkit::npapi::WebPluginPageDelegate { virtual webkit::npapi::WebPluginDelegate* CreatePluginDelegate( const FilePath& file_path, - const std::string& mime_type) { - // We don't need a valid native window handle in layout tests. - // So just passing 0. - return webkit::npapi::WebPluginDelegateImpl::Create( - file_path, mime_type, 0); - } + const std::string& mime_type); virtual void CreatedPluginWindow(gfx::PluginWindowHandle handle) {} virtual void WillDestroyPluginWindow(gfx::PluginWindowHandle handle) {} virtual void DidMovePlugin(const webkit::npapi::WebPluginGeometry& move) {} @@ -35,9 +30,7 @@ class TestWebPluginPageDelegate : public webkit::npapi::WebPluginPageDelegate { const gfx::Size& size, const std::string& json_arguments, std::string* json_retval) {} - virtual WebKit::WebCookieJar* GetCookieJar() { - return WebKit::webKitClient()->cookieJar(); - } + virtual WebKit::WebCookieJar* GetCookieJar(); }; } // namespace webkit_support diff --git a/webkit/support/webkit_support.gypi b/webkit/support/webkit_support.gypi index c096009..d4b1192 100644 --- a/webkit/support/webkit_support.gypi +++ b/webkit/support/webkit_support.gypi @@ -40,6 +40,7 @@ 'platform_support_win.cc', 'test_webkit_client.cc', 'test_webkit_client.h', + 'test_webplugin_page_delegate.cc', 'test_webplugin_page_delegate.h', 'webkit_support.cc', 'webkit_support.h', diff --git a/webkit/support/weburl_loader_mock_factory.cc b/webkit/support/weburl_loader_mock_factory.cc index ce30ac9..f4c3dde8 100644 --- a/webkit/support/weburl_loader_mock_factory.cc +++ b/webkit/support/weburl_loader_mock_factory.cc @@ -20,6 +20,15 @@ using WebKit::WebURLLoader; using WebKit::WebURLRequest; using WebKit::WebURLResponse; +struct WebURLLoaderMockFactory::ResponseInfo { + WebKit::WebURLResponse response; + FilePath file_path; +}; + +WebURLLoaderMockFactory::WebURLLoaderMockFactory() {} + +WebURLLoaderMockFactory::~WebURLLoaderMockFactory() {} + void WebURLLoaderMockFactory::RegisterURL(const WebURL& url, const WebURLResponse& response, const WebString& file_path) { diff --git a/webkit/support/weburl_loader_mock_factory.h b/webkit/support/weburl_loader_mock_factory.h index 03d2eff..51e238d 100644 --- a/webkit/support/weburl_loader_mock_factory.h +++ b/webkit/support/weburl_loader_mock_factory.h @@ -28,8 +28,8 @@ class WebURLLoaderMock; // ServeAsynchronousRequest. class WebURLLoaderMockFactory { public: - WebURLLoaderMockFactory() {} - virtual ~WebURLLoaderMockFactory() {} + WebURLLoaderMockFactory(); + virtual ~WebURLLoaderMockFactory(); // Called by TestWebKitClient to create a WebURLLoader. // Non-mocked request are forwarded to |default_loader| which should not be @@ -67,10 +67,7 @@ class WebURLLoaderMockFactory { void CancelLoad(WebURLLoaderMock* loader); private: - struct ResponseInfo { - WebKit::WebURLResponse response; - FilePath file_path; - }; + struct ResponseInfo; // Loads the specified request and populates the response, error and data // accordingly. |