summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-02 01:16:46 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-02 01:16:46 +0000
commit09fb387aa28e997593d5d5c11cf4a5fb12258217 (patch)
tree18c92d7099ac4ca248ee5e2061aa3ea82b111eb7 /webkit
parent06aca52af687c5d55794a56aa9e3d625ce6ea8ea (diff)
downloadchromium_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')
-rw-r--r--webkit/glue/webkit_glue.gypi1
-rw-r--r--webkit/glue/webmenuitem.cc31
-rw-r--r--webkit/glue/webmenuitem.h16
-rw-r--r--webkit/gpu/webgraphicscontext3d_in_process_impl.cc13
-rw-r--r--webkit/gpu/webgraphicscontext3d_in_process_impl.h13
-rw-r--r--webkit/plugins/ppapi/resource_tracker.cc12
-rw-r--r--webkit/plugins/ppapi/resource_tracker.h12
-rw-r--r--webkit/support/test_webkit_client.h4
-rw-r--r--webkit/support/test_webplugin_page_delegate.cc27
-rw-r--r--webkit/support/test_webplugin_page_delegate.h11
-rw-r--r--webkit/support/webkit_support.gypi1
-rw-r--r--webkit/support/weburl_loader_mock_factory.cc9
-rw-r--r--webkit/support/weburl_loader_mock_factory.h9
-rw-r--r--webkit/tools/test_shell/test_shell_webmimeregistry_impl.cc2
-rw-r--r--webkit/tools/test_shell/test_shell_webmimeregistry_impl.h1
15 files changed, 111 insertions, 51 deletions
diff --git a/webkit/glue/webkit_glue.gypi b/webkit/glue/webkit_glue.gypi
index 3333035..fcd1a04 100644
--- a/webkit/glue/webkit_glue.gypi
+++ b/webkit/glue/webkit_glue.gypi
@@ -453,6 +453,7 @@
'webkitclient_impl.h',
'webmediaplayer_impl.h',
'webmediaplayer_impl.cc',
+ 'webmenuitem.cc',
'webmenuitem.h',
'webmenurunner_mac.h',
'webmenurunner_mac.mm',
diff --git a/webkit/glue/webmenuitem.cc b/webkit/glue/webmenuitem.cc
new file mode 100644
index 0000000..b1b9615
--- /dev/null
+++ b/webkit/glue/webmenuitem.cc
@@ -0,0 +1,31 @@
+// 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/glue/webmenuitem.h"
+
+WebMenuItem::WebMenuItem()
+ : type(OPTION),
+ action(0),
+ enabled(false),
+ checked(false) {
+}
+
+WebMenuItem::WebMenuItem(const WebKit::WebMenuItemInfo& item)
+ : label(item.label),
+ type(static_cast<Type>(item.type)),
+ action(item.action),
+ enabled(item.enabled),
+ checked(item.checked) {
+}
+
+WebMenuItem::WebMenuItem(const WebMenuItem& item)
+ : label(item.label),
+ type(item.type),
+ action(item.action),
+ enabled(item.enabled),
+ checked(item.checked),
+ submenu(item.submenu) {
+}
+
+WebMenuItem::~WebMenuItem() {}
diff --git a/webkit/glue/webmenuitem.h b/webkit/glue/webmenuitem.h
index c767bea..c2e5f1d 100644
--- a/webkit/glue/webmenuitem.h
+++ b/webkit/glue/webmenuitem.h
@@ -21,23 +21,17 @@ struct WebMenuItem {
SUBMENU // This is currently only used by Pepper, not by WebKit.
};
+ WebMenuItem();
+ WebMenuItem(const WebKit::WebMenuItemInfo& item);
+ WebMenuItem(const WebMenuItem& item);
+ ~WebMenuItem();
+
string16 label;
Type type;
unsigned action;
bool enabled;
bool checked;
std::vector<WebMenuItem> submenu;
-
- WebMenuItem() : type(OPTION), action(0), enabled(false), checked(false) {
- }
-
- WebMenuItem(const WebKit::WebMenuItemInfo& item)
- : label(item.label),
- type(static_cast<Type>(item.type)),
- action(item.action),
- enabled(item.enabled),
- checked(item.checked) {
- }
};
#endif // WEBMENUITEM_H_
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_impl.cc b/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
index 3721bbf..3e97073 100644
--- a/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
+++ b/webkit/gpu/webgraphicscontext3d_in_process_impl.cc
@@ -25,6 +25,19 @@ enum {
MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD
};
+struct WebGraphicsContext3DInProcessImpl::ShaderSourceEntry {
+ explicit ShaderSourceEntry(WGC3Denum shader_type)
+ : type(shader_type),
+ is_valid(false) {
+ }
+
+ WGC3Denum type;
+ scoped_array<char> source;
+ scoped_array<char> log;
+ scoped_array<char> translated_source;
+ bool is_valid;
+};
+
WebGraphicsContext3DInProcessImpl::WebGraphicsContext3DInProcessImpl()
: initialized_(false),
render_directly_to_web_view_(false),
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_impl.h b/webkit/gpu/webgraphicscontext3d_in_process_impl.h
index bdf2494..df4dded 100644
--- a/webkit/gpu/webgraphicscontext3d_in_process_impl.h
+++ b/webkit/gpu/webgraphicscontext3d_in_process_impl.h
@@ -399,18 +399,7 @@ class WebGraphicsContext3DInProcessImpl : public WebGraphicsContext3D {
private:
// ANGLE related.
- struct ShaderSourceEntry {
- explicit ShaderSourceEntry(WGC3Denum shader_type)
- : type(shader_type),
- is_valid(false) {
- }
-
- WGC3Denum type;
- scoped_array<char> source;
- scoped_array<char> log;
- scoped_array<char> translated_source;
- bool is_valid;
- };
+ struct ShaderSourceEntry;
typedef base::hash_map<WebGLId, ShaderSourceEntry*> ShaderSourceMap;
diff --git a/webkit/plugins/ppapi/resource_tracker.cc b/webkit/plugins/ppapi/resource_tracker.cc
index 4874c79..ed876d7 100644
--- a/webkit/plugins/ppapi/resource_tracker.cc
+++ b/webkit/plugins/ppapi/resource_tracker.cc
@@ -46,6 +46,18 @@ namespace ppapi {
static base::LazyInstance<ResourceTracker> g_resource_tracker(
base::LINKER_INITIALIZED);
+struct ResourceTracker::InstanceData {
+ InstanceData() : instance(0) {}
+
+ // Non-owning pointer to the instance object. When a PluginInstance is
+ // destroyed, it will notify us and we'll delete all associated data.
+ PluginInstance* instance;
+
+ // Resources and object vars associated with the instance.
+ ResourceSet resources;
+ VarSet object_vars;
+};
+
scoped_refptr<Resource> ResourceTracker::GetResource(PP_Resource res) const {
DLOG_IF(ERROR, !CheckIdType(res, PP_ID_TYPE_RESOURCE))
<< res << " is not a PP_Resource.";
diff --git a/webkit/plugins/ppapi/resource_tracker.h b/webkit/plugins/ppapi/resource_tracker.h
index 32a4c7b..1187dda 100644
--- a/webkit/plugins/ppapi/resource_tracker.h
+++ b/webkit/plugins/ppapi/resource_tracker.h
@@ -103,17 +103,7 @@ class ResourceTracker {
typedef std::set<int32> VarSet;
// Per-instance data we track.
- struct InstanceData {
- InstanceData() : instance(0) {}
-
- // Non-owning pointer to the instance object. When a PluginInstance is
- // destroyed, it will notify us and we'll delete all associated data.
- PluginInstance* instance;
-
- // Resources and object vars associated with the instance.
- ResourceSet resources;
- VarSet object_vars;
- };
+ struct InstanceData;
// Prohibit creation other then by the Singleton class.
ResourceTracker();
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.
diff --git a/webkit/tools/test_shell/test_shell_webmimeregistry_impl.cc b/webkit/tools/test_shell/test_shell_webmimeregistry_impl.cc
index 4f2e4de..ed64d3f 100644
--- a/webkit/tools/test_shell/test_shell_webmimeregistry_impl.cc
+++ b/webkit/tools/test_shell/test_shell_webmimeregistry_impl.cc
@@ -37,6 +37,8 @@ TestShellWebMimeRegistryImpl::TestShellWebMimeRegistryImpl() {
codecs_map_.insert("1"); // PCM for WAV.
}
+TestShellWebMimeRegistryImpl::~TestShellWebMimeRegistryImpl() {}
+
WebMimeRegistry::SupportsType
TestShellWebMimeRegistryImpl::supportsMediaMIMEType(
const WebString& mime_type, const WebString& codecs) {
diff --git a/webkit/tools/test_shell/test_shell_webmimeregistry_impl.h b/webkit/tools/test_shell/test_shell_webmimeregistry_impl.h
index f20b52a..9ebf201 100644
--- a/webkit/tools/test_shell/test_shell_webmimeregistry_impl.h
+++ b/webkit/tools/test_shell/test_shell_webmimeregistry_impl.h
@@ -15,6 +15,7 @@ class TestShellWebMimeRegistryImpl
: public webkit_glue::SimpleWebMimeRegistryImpl {
public:
TestShellWebMimeRegistryImpl();
+ virtual ~TestShellWebMimeRegistryImpl();
// Override to force that we only support ogg, vorbis and theora.
//