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
This commit is contained in:
chrome
jingle/notifier/base
remoting/client
webkit
@ -331,6 +331,10 @@ size_t FormStructure::field_count() const {
|
||||
return (field_size == 0) ? 0 : field_size - 1;
|
||||
}
|
||||
|
||||
std::string FormStructure::server_experiment_id() const {
|
||||
return server_experiment_id_;
|
||||
}
|
||||
|
||||
bool FormStructure::operator==(const FormData& form) const {
|
||||
// TODO(jhawkins): Is this enough to differentiate a form?
|
||||
if (form_name_ == form.name &&
|
||||
|
@ -102,9 +102,7 @@ class FormStructure {
|
||||
|
||||
const GURL& source_url() const { return source_url_; }
|
||||
|
||||
virtual std::string server_experiment_id() const {
|
||||
return server_experiment_id_;
|
||||
}
|
||||
virtual std::string server_experiment_id() const;
|
||||
|
||||
bool operator==(const webkit_glue::FormData& form) const;
|
||||
bool operator!=(const webkit_glue::FormData& form) const;
|
||||
|
@ -56,6 +56,16 @@ static const int kBackoffRandomizationFactor = 2;
|
||||
|
||||
const int SyncerThread::kMaxBackoffSeconds = 60 * 60 * 4; // 4 hours.
|
||||
|
||||
SyncerThread::ProtectedFields::ProtectedFields()
|
||||
: stop_syncer_thread_(false),
|
||||
pause_requested_(false),
|
||||
paused_(false),
|
||||
syncer_(NULL),
|
||||
connected_(false),
|
||||
pending_nudge_source_(kUnknown) {}
|
||||
|
||||
SyncerThread::ProtectedFields::~ProtectedFields() {}
|
||||
|
||||
void SyncerThread::NudgeSyncerWithPayloads(
|
||||
int milliseconds_from_now,
|
||||
NudgeSource source,
|
||||
|
@ -181,6 +181,9 @@ class SyncerThread : public base::RefCountedThreadSafe<SyncerThread>,
|
||||
// Fields that are modified / accessed by multiple threads go in this struct
|
||||
// for clarity and explicitness.
|
||||
struct ProtectedFields {
|
||||
ProtectedFields();
|
||||
~ProtectedFields();
|
||||
|
||||
// False when we want to stop the thread.
|
||||
bool stop_syncer_thread_;
|
||||
|
||||
@ -217,14 +220,6 @@ class SyncerThread : public base::RefCountedThreadSafe<SyncerThread>,
|
||||
// really need to access mutually exclusively as the data races that exist
|
||||
// are intrinsic, but do so anyway and avoid using 'volatile'.
|
||||
WaitInterval current_wait_interval_;
|
||||
|
||||
ProtectedFields()
|
||||
: stop_syncer_thread_(false),
|
||||
pause_requested_(false),
|
||||
paused_(false),
|
||||
syncer_(NULL),
|
||||
connected_(false),
|
||||
pending_nudge_source_(kUnknown) {}
|
||||
} vault_;
|
||||
|
||||
// Gets signaled whenever a thread outside of the syncer thread changes a
|
||||
|
@ -17,6 +17,8 @@ JsArgList::JsArgList(const ListValue& args)
|
||||
JsArgList::JsArgList(const std::vector<const Value*>& args)
|
||||
: args_(new SharedListValue(args)) {}
|
||||
|
||||
JsArgList::~JsArgList() {}
|
||||
|
||||
const ListValue& JsArgList::Get() const {
|
||||
return args_->Get();
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ class JsArgList {
|
||||
JsArgList();
|
||||
explicit JsArgList(const ListValue& args);
|
||||
explicit JsArgList(const std::vector<const Value*>& args);
|
||||
~JsArgList();
|
||||
|
||||
const ListValue& Get() const;
|
||||
|
||||
|
@ -61,6 +61,8 @@ SyncSourceInfo::SyncSourceInfo(
|
||||
const TypePayloadMap& t)
|
||||
: updates_source(u), types(t) {}
|
||||
|
||||
SyncSourceInfo::~SyncSourceInfo() {}
|
||||
|
||||
SyncerStatus::SyncerStatus()
|
||||
: invalid_store(false),
|
||||
syncer_stuck(false),
|
||||
|
@ -60,6 +60,7 @@ struct SyncSourceInfo {
|
||||
SyncSourceInfo(
|
||||
const sync_pb::GetUpdatesCallerInfo::GetUpdatesSource& u,
|
||||
const TypePayloadMap& t);
|
||||
~SyncSourceInfo();
|
||||
|
||||
sync_pb::GetUpdatesCallerInfo::GetUpdatesSource updates_source;
|
||||
TypePayloadMap types;
|
||||
|
9
chrome/browser/tab_contents/tab_contents_observer.cc
Normal file
9
chrome/browser/tab_contents/tab_contents_observer.cc
Normal file
@ -0,0 +1,9 @@
|
||||
// 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 "chrome/browser/tab_contents/tab_contents_observer.h"
|
||||
|
||||
bool TabContentsObserver::OnMessageReceived(const IPC::Message& message) {
|
||||
return false;
|
||||
}
|
@ -27,7 +27,7 @@ class TabContentsObserver : public IPC::Channel::Listener {
|
||||
virtual void DidStopLoading() { }
|
||||
|
||||
// IPC::Channel::Listener implementation.
|
||||
virtual bool OnMessageReceived(const IPC::Message& message) { return false; }
|
||||
virtual bool OnMessageReceived(const IPC::Message& message);
|
||||
|
||||
#if 0
|
||||
// For unifying with delegate...
|
||||
|
@ -2326,6 +2326,7 @@
|
||||
'browser/tab_contents/tab_contents.h',
|
||||
'browser/tab_contents/tab_contents_delegate.cc',
|
||||
'browser/tab_contents/tab_contents_delegate.h',
|
||||
'browser/tab_contents/tab_contents_observer.cc',
|
||||
'browser/tab_contents/tab_contents_observer.h',
|
||||
'browser/tab_contents/tab_contents_ssl_helper.cc',
|
||||
'browser/tab_contents/tab_contents_ssl_helper.h',
|
||||
|
@ -43,6 +43,8 @@ FakeBaseTask::FakeBaseTask() {
|
||||
base_task_ = weak_xmpp_client->AsWeakPtr();
|
||||
}
|
||||
|
||||
FakeBaseTask::~FakeBaseTask() {}
|
||||
|
||||
base::WeakPtr<talk_base::Task> FakeBaseTask::AsWeakPtr() {
|
||||
return base_task_;
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ namespace notifier {
|
||||
class FakeBaseTask {
|
||||
public:
|
||||
FakeBaseTask();
|
||||
~FakeBaseTask();
|
||||
|
||||
base::WeakPtr<talk_base::Task> AsWeakPtr();
|
||||
|
||||
|
@ -19,7 +19,7 @@ class X11InputHandler : public InputHandler {
|
||||
ChromotingView* view);
|
||||
virtual ~X11InputHandler();
|
||||
|
||||
void Initialize();
|
||||
virtual void Initialize();
|
||||
|
||||
private:
|
||||
|
||||
|
@ -453,6 +453,7 @@
|
||||
'webkitclient_impl.h',
|
||||
'webmediaplayer_impl.h',
|
||||
'webmediaplayer_impl.cc',
|
||||
'webmenuitem.cc',
|
||||
'webmenuitem.h',
|
||||
'webmenurunner_mac.h',
|
||||
'webmenurunner_mac.mm',
|
||||
|
31
webkit/glue/webmenuitem.cc
Normal file
31
webkit/glue/webmenuitem.cc
Normal file
@ -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() {}
|
@ -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_
|
||||
|
@ -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),
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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.";
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
|
27
webkit/support/test_webplugin_page_delegate.cc
Normal file
27
webkit/support/test_webplugin_page_delegate.cc
Normal file
@ -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
|
||||
|
@ -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
|
||||
|
@ -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',
|
||||
|
@ -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) {
|
||||
|
@ -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.
|
||||
|
@ -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) {
|
||||
|
@ -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.
|
||||
//
|
||||
|
Reference in New Issue
Block a user