diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-13 17:44:15 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-13 17:44:15 +0000 |
commit | bbf94a3e7f3c4372c4ff918a6811a505d8fd69b9 (patch) | |
tree | c5d2614d92182544af89d3908be118149fae185a | |
parent | 372c8e90fba9881bdf52298587f336cc083e3b17 (diff) | |
download | chromium_src-bbf94a3e7f3c4372c4ff918a6811a505d8fd69b9.zip chromium_src-bbf94a3e7f3c4372c4ff918a6811a505d8fd69b9.tar.gz chromium_src-bbf94a3e7f3c4372c4ff918a6811a505d8fd69b9.tar.bz2 |
FBTF: Fix more ctor/dtors found by clang plugin.
(1.2 megs off of Debug Linux .a files)
BUG=none
TEST=compiles everywhere
Review URL: http://codereview.chromium.org/3743001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62420 0039d316-1c4b-4281-b951-d872f2087c98
41 files changed, 220 insertions, 88 deletions
diff --git a/base/process_util.cc b/base/process_util.cc index f6e0d84..6293740 100644 --- a/base/process_util.cc +++ b/base/process_util.cc @@ -6,6 +6,11 @@ namespace base { +#if defined(OS_POSIX) +ProcessEntry::ProcessEntry() {} +ProcessEntry::~ProcessEntry() {} +#endif + int GetProcessCount(const std::wstring& executable_name, const ProcessFilter* filter) { int count = 0; diff --git a/base/process_util.h b/base/process_util.h index 38d96ec..77d772b 100644 --- a/base/process_util.h +++ b/base/process_util.h @@ -81,6 +81,9 @@ const uint32 kProcessAccessWaitForTermination = SYNCHRONIZE; #elif defined(OS_POSIX) struct ProcessEntry { + ProcessEntry(); + ~ProcessEntry(); + ProcessId pid_; ProcessId ppid_; ProcessId gid_; diff --git a/base/thread_checker.cc b/base/thread_checker.cc index 7a41a448..394a90a 100644 --- a/base/thread_checker.cc +++ b/base/thread_checker.cc @@ -11,6 +11,8 @@ ThreadChecker::ThreadChecker() { EnsureThreadIdAssigned(); } +ThreadChecker::~ThreadChecker() {} + bool ThreadChecker::CalledOnValidThread() const { EnsureThreadIdAssigned(); return *valid_thread_id_ == PlatformThread::CurrentId(); diff --git a/base/thread_checker.h b/base/thread_checker.h index 60b8474..5d5445e 100644 --- a/base/thread_checker.h +++ b/base/thread_checker.h @@ -35,6 +35,7 @@ class ThreadChecker { public: ThreadChecker(); + ~ThreadChecker(); bool CalledOnValidThread() const; diff --git a/chrome/browser/extensions/default_apps.cc b/chrome/browser/extensions/default_apps.cc index 5614dfb..7dd85aa 100644 --- a/chrome/browser/extensions/default_apps.cc +++ b/chrome/browser/extensions/default_apps.cc @@ -25,6 +25,8 @@ DefaultApps::DefaultApps(PrefService* prefs) ids_.insert("apdfllckaahabafndbhieahigkjlhalf"); } +DefaultApps::~DefaultApps() {} + const ExtensionIdSet* DefaultApps::GetAppsToInstall() const { if (GetDefaultAppsInstalled()) return NULL; diff --git a/chrome/browser/extensions/default_apps.h b/chrome/browser/extensions/default_apps.h index f61539f..1f572df 100644 --- a/chrome/browser/extensions/default_apps.h +++ b/chrome/browser/extensions/default_apps.h @@ -37,6 +37,7 @@ class DefaultApps { static void RegisterUserPrefs(PrefService* prefs); explicit DefaultApps(PrefService* prefs); + ~DefaultApps(); // Gets the list of default apps that should be installed. Can return NULL if // no apps need to be installed. diff --git a/chrome/browser/shell_dialogs.cc b/chrome/browser/shell_dialogs.cc new file mode 100644 index 0000000..c0f6875 --- /dev/null +++ b/chrome/browser/shell_dialogs.cc @@ -0,0 +1,17 @@ +// 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 "chrome/browser/shell_dialogs.h" + +SelectFileDialog::FileTypeInfo::FileTypeInfo() : include_all_files(false) {} + +SelectFileDialog::FileTypeInfo::~FileTypeInfo() {} + +SelectFileDialog::SelectFileDialog() {} + +SelectFileDialog::~SelectFileDialog() {} + +SelectFontDialog::SelectFontDialog() {} + +SelectFontDialog::~SelectFontDialog() {} diff --git a/chrome/browser/shell_dialogs.h b/chrome/browser/shell_dialogs.h index eac3f5e..9b080f9 100644 --- a/chrome/browser/shell_dialogs.h +++ b/chrome/browser/shell_dialogs.h @@ -92,6 +92,9 @@ class SelectFileDialog // |include_all_files| specifies whether there will be a filter added for all // files (i.e. *.*). struct FileTypeInfo { + FileTypeInfo(); + ~FileTypeInfo(); + std::vector<std::vector<FilePath::StringType> > extensions; std::vector<string16> extension_description_overrides; bool include_all_files; @@ -134,8 +137,8 @@ class SelectFileDialog protected: friend class base::RefCountedThreadSafe<SelectFileDialog>; - - virtual ~SelectFileDialog() {} + SelectFileDialog(); + virtual ~SelectFileDialog(); }; // Shows a dialog box for selecting a font. @@ -191,8 +194,8 @@ class SelectFontDialog protected: friend class base::RefCountedThreadSafe<SelectFontDialog>; - - virtual ~SelectFontDialog() {} + SelectFontDialog(); + virtual ~SelectFontDialog(); }; #endif // CHROME_BROWSER_SHELL_DIALOGS_H_ diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc index 5db7189..b94ab7d 100644 --- a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc +++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc @@ -26,6 +26,10 @@ #include "chrome/common/notification_service.h" #include "chrome/common/pref_names.h" +RenderViewHostDelegateViewHelper::RenderViewHostDelegateViewHelper() {} + +RenderViewHostDelegateViewHelper::~RenderViewHostDelegateViewHelper() {} + BackgroundContents* RenderViewHostDelegateViewHelper::MaybeCreateBackgroundContents( int route_id, diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.h b/chrome/browser/tab_contents/render_view_host_delegate_helper.h index 53cefcb..5afe3c7 100644 --- a/chrome/browser/tab_contents/render_view_host_delegate_helper.h +++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.h @@ -30,8 +30,8 @@ class TabContents; // RenderViewHostDelegate::View methods. class RenderViewHostDelegateViewHelper { public: - RenderViewHostDelegateViewHelper() {} - virtual ~RenderViewHostDelegateViewHelper() {} + RenderViewHostDelegateViewHelper(); + virtual ~RenderViewHostDelegateViewHelper(); // Creates a new renderer for window.open. This will either be a // BackgroundContents (if the window_container_type == diff --git a/chrome/browser/tab_contents/tab_contents_view.cc b/chrome/browser/tab_contents/tab_contents_view.cc index c03bc35..9acb0bd 100644 --- a/chrome/browser/tab_contents/tab_contents_view.cc +++ b/chrome/browser/tab_contents/tab_contents_view.cc @@ -16,6 +16,8 @@ TabContentsView::TabContentsView(TabContents* tab_contents) : tab_contents_(tab_contents) { } +TabContentsView::~TabContentsView() {} + void TabContentsView::RenderWidgetHostDestroyed(RenderWidgetHost* host) { if (host->view()) host->view()->WillDestroyRenderWidget(host); @@ -103,6 +105,20 @@ void TabContentsView::UpdatePreferredSize(const gfx::Size& pref_size) { tab_contents_->delegate()->UpdatePreferredSize(pref_size); } +bool TabContentsView::IsDoingDrag() const { + return false; +} + +bool TabContentsView::IsEventTracking() const { + return false; +} + +bool TabContentsView::ShouldDrawDropShadow() { + return false; +} + +TabContentsView::TabContentsView() {} + void TabContentsView::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { if (tab_contents_->delegate()) tab_contents_->delegate()->HandleKeyboardEvent(event); diff --git a/chrome/browser/tab_contents/tab_contents_view.h b/chrome/browser/tab_contents/tab_contents_view.h index c2e7cc3e..4550781 100644 --- a/chrome/browser/tab_contents/tab_contents_view.h +++ b/chrome/browser/tab_contents/tab_contents_view.h @@ -31,7 +31,7 @@ class TabContents; class TabContentsView : public RenderViewHostDelegate::View { public: explicit TabContentsView(TabContents* tab_contents); - virtual ~TabContentsView() {} + virtual ~TabContentsView(); // Creates the appropriate type of TabContentsView for the current system. // The return value is a new heap allocated view with ownership passing to @@ -142,9 +142,7 @@ class TabContentsView : public RenderViewHostDelegate::View { // If we try to close the tab while a drag is in progress, we crash. These // methods allow the tab contents to determine if a drag is in progress and // postpone the tab closing. - virtual bool IsDoingDrag() const { - return false; - } + virtual bool IsDoingDrag() const; virtual void CancelDragAndCloseTab() {} // If we close the tab while a UI control is in an event-tracking @@ -152,17 +150,13 @@ class TabContentsView : public RenderViewHostDelegate::View { // TabContents::Close() calls IsEventTracking(), and if it returns // true CloseTabAfterEventTracking() is called and the close is not // completed. - virtual bool IsEventTracking() const { - return false; - } + virtual bool IsEventTracking() const; virtual void CloseTabAfterEventTracking() {} - virtual bool ShouldDrawDropShadow() { - return false; - } + virtual bool ShouldDrawDropShadow(); protected: - TabContentsView() {} // Abstract interface. + TabContentsView(); // Abstract interface. // Internal functions used to support the CreateNewWidget() method. If a // platform requires plugging into widget creation at a lower level then a diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index f2a6c57..8667d92 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -2613,6 +2613,7 @@ 'browser/sessions/session_types.h', 'browser/sessions/tab_restore_service.cc', 'browser/sessions/tab_restore_service.h', + 'browser/shell_dialogs.cc', 'browser/shell_dialogs.h', 'browser/shell_integration.cc', 'browser/shell_integration.h', diff --git a/chrome/common/webmessageportchannel_impl.cc b/chrome/common/webmessageportchannel_impl.cc index 24304fd..888ab78 100644 --- a/chrome/common/webmessageportchannel_impl.cc +++ b/chrome/common/webmessageportchannel_impl.cc @@ -235,3 +235,7 @@ void WebMessagePortChannelImpl::OnMessagedQueued() { Release(); ChildProcess::current()->ReleaseProcess(); } + +WebMessagePortChannelImpl::Message::Message() {} + +WebMessagePortChannelImpl::Message::~Message() {} diff --git a/chrome/common/webmessageportchannel_impl.h b/chrome/common/webmessageportchannel_impl.h index 313fd23..3c96fc38 100644 --- a/chrome/common/webmessageportchannel_impl.h +++ b/chrome/common/webmessageportchannel_impl.h @@ -56,6 +56,9 @@ class WebMessagePortChannelImpl void OnMessagedQueued(); struct Message { + Message(); + ~Message(); + string16 message; std::vector<WebMessagePortChannelImpl*> ports; }; diff --git a/chrome/profile_import/profile_import_thread.cc b/chrome/profile_import/profile_import_thread.cc index 6f097b3..dce3c62 100644 --- a/chrome/profile_import/profile_import_thread.cc +++ b/chrome/profile_import/profile_import_thread.cc @@ -32,6 +32,8 @@ ProfileImportThread::ProfileImportThread() ChildProcess::current()->AddRefProcess(); // Balanced in Cleanup(). } +ProfileImportThread::~ProfileImportThread() {} + void ProfileImportThread::OnControlMessageReceived(const IPC::Message& msg) { IPC_BEGIN_MESSAGE_MAP(ProfileImportThread, msg) IPC_MESSAGE_HANDLER(ProfileImportProcessMsg_StartImport, diff --git a/chrome/profile_import/profile_import_thread.h b/chrome/profile_import/profile_import_thread.h index f780cc5..e3335bc 100644 --- a/chrome/profile_import/profile_import_thread.h +++ b/chrome/profile_import/profile_import_thread.h @@ -28,7 +28,7 @@ class InProcessImporterBridge; class ProfileImportThread : public ChildThread { public: ProfileImportThread(); - virtual ~ProfileImportThread() {} + virtual ~ProfileImportThread(); // Returns the one profile import thread. static ProfileImportThread* current() { diff --git a/gpu/command_buffer/client/fenced_allocator.cc b/gpu/command_buffer/client/fenced_allocator.cc index 3fc625d..f105f3a 100644 --- a/gpu/command_buffer/client/fenced_allocator.cc +++ b/gpu/command_buffer/client/fenced_allocator.cc @@ -14,6 +14,13 @@ namespace gpu { const FencedAllocator::Offset FencedAllocator::kInvalidOffset; #endif +FencedAllocator::FencedAllocator(unsigned int size, + CommandBufferHelper *helper) + : helper_(helper) { + Block block = { FREE, 0, size, kUnusedToken }; + blocks_.push_back(block); +} + FencedAllocator::~FencedAllocator() { // Free blocks pending tokens. for (unsigned int i = 0; i < blocks_.size(); ++i) { diff --git a/gpu/command_buffer/client/fenced_allocator.h b/gpu/command_buffer/client/fenced_allocator.h index fd162db41..70d85f6 100644 --- a/gpu/command_buffer/client/fenced_allocator.h +++ b/gpu/command_buffer/client/fenced_allocator.h @@ -33,11 +33,7 @@ class FencedAllocator { // Creates a FencedAllocator. Note that the size of the buffer is passed, but // not its base address: everything is handled as offsets into the buffer. FencedAllocator(unsigned int size, - CommandBufferHelper *helper) - : helper_(helper) { - Block block = { FREE, 0, size, kUnusedToken }; - blocks_.push_back(block); - } + CommandBufferHelper *helper); ~FencedAllocator(); diff --git a/gpu/command_buffer/client/mapped_memory.cc b/gpu/command_buffer/client/mapped_memory.cc index d2c4886..1a63c6f 100644 --- a/gpu/command_buffer/client/mapped_memory.cc +++ b/gpu/command_buffer/client/mapped_memory.cc @@ -22,6 +22,10 @@ MemoryChunk::MemoryChunk( allocator_(shm.size, helper, shm.ptr) { } +MappedMemoryManager::MappedMemoryManager(CommandBufferHelper* helper) + : helper_(helper) { +} + MappedMemoryManager::~MappedMemoryManager() { std::for_each(chunks_.begin(), chunks_.end(), diff --git a/gpu/command_buffer/client/mapped_memory.h b/gpu/command_buffer/client/mapped_memory.h index dcd0b58..f5f3e37 100644 --- a/gpu/command_buffer/client/mapped_memory.h +++ b/gpu/command_buffer/client/mapped_memory.h @@ -101,9 +101,7 @@ class MemoryChunk { // Manages MemoryChucks. class MappedMemoryManager { public: - explicit MappedMemoryManager(CommandBufferHelper* helper) - : helper_(helper) { - } + explicit MappedMemoryManager(CommandBufferHelper* helper); ~MappedMemoryManager(); diff --git a/gpu/command_buffer/common/id_allocator.cc b/gpu/command_buffer/common/id_allocator.cc index 6b2c0e4..68f7972 100644 --- a/gpu/command_buffer/common/id_allocator.cc +++ b/gpu/command_buffer/common/id_allocator.cc @@ -9,7 +9,35 @@ namespace gpu { -IdAllocator::IdAllocator() { +IdAllocator::IdAllocator() {} + +IdAllocator::~IdAllocator() {} + +ResourceId IdAllocator::AllocateID() { + ResourceId id = FindFirstFree(); + MarkAsUsed(id); + return id; +} + +ResourceId IdAllocator::AllocateIDAtOrAbove(ResourceId desired_id) { + GPU_DCHECK_LT(static_cast<ResourceId>(used_ids_.size()), + static_cast<ResourceId>(-1)); + for (; InUse(desired_id); ++desired_id) {} + MarkAsUsed(desired_id); + return desired_id; +} + +bool IdAllocator::MarkAsUsed(ResourceId id) { + std::pair<ResourceIdSet::iterator, bool> result = used_ids_.insert(id); + return result.second; +} + +void IdAllocator::FreeID(ResourceId id) { + used_ids_.erase(id); +} + +bool IdAllocator::InUse(ResourceId id) const { + return id == kInvalidResource || used_ids_.find(id) != used_ids_.end(); } ResourceId IdAllocator::FindFirstFree() const { @@ -24,12 +52,4 @@ ResourceId IdAllocator::FindFirstFree() const { return id; } -ResourceId IdAllocator::AllocateIDAtOrAbove(ResourceId desired_id) { - GPU_DCHECK_LT(static_cast<ResourceId>(used_ids_.size()), - static_cast<ResourceId>(-1)); - for (; InUse(desired_id); ++desired_id) {} - MarkAsUsed(desired_id); - return desired_id; -} - } // namespace gpu diff --git a/gpu/command_buffer/common/id_allocator.h b/gpu/command_buffer/common/id_allocator.h index 76edc34..05c6af07 100644 --- a/gpu/command_buffer/common/id_allocator.h +++ b/gpu/command_buffer/common/id_allocator.h @@ -22,33 +22,23 @@ static const ResourceId kInvalidResource = 0u; class IdAllocator { public: IdAllocator(); + ~IdAllocator(); // Allocates a new resource ID. - ResourceId AllocateID() { - ResourceId id = FindFirstFree(); - MarkAsUsed(id); - return id; - } + ResourceId AllocateID(); // Allocates an Id starting at or above desired_id. // Note: may wrap if it starts near limit. ResourceId AllocateIDAtOrAbove(ResourceId desired_id); // Marks an id as used. Returns false if id was already used. - bool MarkAsUsed(ResourceId id) { - std::pair<ResourceIdSet::iterator, bool> result = used_ids_.insert(id); - return result.second; - } + bool MarkAsUsed(ResourceId id); // Frees a resource ID. - void FreeID(ResourceId id) { - used_ids_.erase(id); - } + void FreeID(ResourceId id); // Checks whether or not a resource ID is in use. - bool InUse(ResourceId id) const { - return id == kInvalidResource || used_ids_.find(id) != used_ids_.end(); - } + bool InUse(ResourceId id) const; private: // TODO(gman): This would work much better with ranges or a hash table. diff --git a/gpu/command_buffer/service/buffer_manager.cc b/gpu/command_buffer/service/buffer_manager.cc index 2abc764..70c5ccb 100644 --- a/gpu/command_buffer/service/buffer_manager.cc +++ b/gpu/command_buffer/service/buffer_manager.cc @@ -10,6 +10,10 @@ namespace gpu { namespace gles2 { +BufferManager::BufferManager() + : allow_buffers_on_multiple_targets_(false) { +} + BufferManager::~BufferManager() { DCHECK(buffer_infos_.empty()); } @@ -50,6 +54,15 @@ void BufferManager::RemoveBufferInfo(GLuint client_id) { } } +BufferManager::BufferInfo::BufferInfo(GLuint service_id) + : service_id_(service_id), + target_(0), + size_(0), + shadowed_(false) { +} + +BufferManager::BufferInfo::~BufferInfo() { } + void BufferManager::BufferInfo::SetSize(GLsizeiptr size, bool shadow) { DCHECK(!IsDeleted()); if (size != size_ || shadow != shadowed_) { diff --git a/gpu/command_buffer/service/buffer_manager.h b/gpu/command_buffer/service/buffer_manager.h index f89faeb..86f6bb8 100644 --- a/gpu/command_buffer/service/buffer_manager.h +++ b/gpu/command_buffer/service/buffer_manager.h @@ -27,12 +27,7 @@ class BufferManager { public: typedef scoped_refptr<BufferInfo> Ref; - explicit BufferInfo(GLuint service_id) - : service_id_(service_id), - target_(0), - size_(0), - shadowed_(false) { - } + explicit BufferInfo(GLuint service_id); GLuint service_id() const { return service_id_; @@ -91,7 +86,7 @@ class BufferManager { GLenum type_; }; - ~BufferInfo() { } + ~BufferInfo(); GLenum target() const { return target_; @@ -140,9 +135,7 @@ class BufferManager { RangeToMaxValueMap range_set_; }; - BufferManager() - : allow_buffers_on_multiple_targets_(false) { - } + BufferManager(); ~BufferManager(); // Must call before destruction. diff --git a/gpu/command_buffer/service/common_decoder.cc b/gpu/command_buffer/service/common_decoder.cc index c28c448..ce45422 100644 --- a/gpu/command_buffer/service/common_decoder.cc +++ b/gpu/command_buffer/service/common_decoder.cc @@ -7,6 +7,10 @@ namespace gpu { +CommonDecoder::Bucket::Bucket() : size_(0) {} + +CommonDecoder::Bucket::~Bucket() {} + void* CommonDecoder::Bucket::GetData(size_t offset, size_t size) const { if (OffsetSizeValid(offset, size)) { return data_.get() + offset; @@ -47,6 +51,10 @@ bool CommonDecoder::Bucket::GetAsString(std::string* str) { return true; } +CommonDecoder::CommonDecoder() : engine_(NULL) {} + +CommonDecoder::~CommonDecoder() {} + void* CommonDecoder::GetAddressAndCheckSize(unsigned int shm_id, unsigned int offset, unsigned int size) { diff --git a/gpu/command_buffer/service/common_decoder.h b/gpu/command_buffer/service/common_decoder.h index adfdaac..7abc016 100644 --- a/gpu/command_buffer/service/common_decoder.h +++ b/gpu/command_buffer/service/common_decoder.h @@ -48,8 +48,8 @@ class CommonDecoder : public AsyncAPIInterface { // be passed across shared memory. class Bucket { public: - Bucket() : size_(0) { - } + Bucket(); + ~Bucket(); size_t size() const { return size_; @@ -92,10 +92,8 @@ class CommonDecoder : public AsyncAPIInterface { DISALLOW_COPY_AND_ASSIGN(Bucket); }; - CommonDecoder() : engine_(NULL) { - } - virtual ~CommonDecoder() { - } + CommonDecoder(); + virtual ~CommonDecoder(); // Sets the engine, to get shared memory buffers from, and to set the token // to. diff --git a/gpu/command_buffer/service/framebuffer_manager.cc b/gpu/command_buffer/service/framebuffer_manager.cc index 9b74f7f..6169a66 100644 --- a/gpu/command_buffer/service/framebuffer_manager.cc +++ b/gpu/command_buffer/service/framebuffer_manager.cc @@ -9,6 +9,8 @@ namespace gpu { namespace gles2 { +FramebufferManager::FramebufferManager() {} + FramebufferManager::~FramebufferManager() { DCHECK(framebuffer_infos_.empty()); } @@ -37,6 +39,12 @@ void FramebufferManager::CreateFramebufferInfo( DCHECK(result.second); } +FramebufferManager::FramebufferInfo::FramebufferInfo(GLuint service_id) + : service_id_(service_id) { +} + +FramebufferManager::FramebufferInfo::~FramebufferInfo() {} + bool FramebufferManager::FramebufferInfo::HasUnclearedAttachment( GLenum attachment) const { AttachmentToRenderbufferMap::const_iterator it = diff --git a/gpu/command_buffer/service/framebuffer_manager.h b/gpu/command_buffer/service/framebuffer_manager.h index 175da42..79ebb2f 100644 --- a/gpu/command_buffer/service/framebuffer_manager.h +++ b/gpu/command_buffer/service/framebuffer_manager.h @@ -24,9 +24,7 @@ class FramebufferManager { public: typedef scoped_refptr<FramebufferInfo> Ref; - explicit FramebufferInfo(GLuint service_id) - : service_id_(service_id) { - } + explicit FramebufferInfo(GLuint service_id); GLuint service_id() const { return service_id_; @@ -49,7 +47,7 @@ class FramebufferManager { friend class FramebufferManager; friend class base::RefCounted<FramebufferInfo>; - ~FramebufferInfo() { } + ~FramebufferInfo(); void MarkAsDeleted() { service_id_ = 0; @@ -65,7 +63,7 @@ class FramebufferManager { AttachmentToRenderbufferMap renderbuffers_; }; - FramebufferManager() { } + FramebufferManager(); ~FramebufferManager(); // Must call before destruction. diff --git a/gpu/command_buffer/service/id_manager.cc b/gpu/command_buffer/service/id_manager.cc index 5052864..be60d7b 100644 --- a/gpu/command_buffer/service/id_manager.cc +++ b/gpu/command_buffer/service/id_manager.cc @@ -8,6 +8,10 @@ namespace gpu { namespace gles2 { +IdManager::IdManager() {} + +IdManager::~IdManager() {} + bool IdManager::AddMapping(GLuint client_id, GLuint service_id) { std::pair<MapType::iterator, bool> result = id_map_.insert( std::make_pair(client_id, service_id)); diff --git a/gpu/command_buffer/service/id_manager.h b/gpu/command_buffer/service/id_manager.h index 9d439be..25e6ac0 100644 --- a/gpu/command_buffer/service/id_manager.h +++ b/gpu/command_buffer/service/id_manager.h @@ -18,7 +18,8 @@ namespace gles2 { // need to be shared by multiple GLES2Decoders. class IdManager { public: - IdManager() { } + IdManager(); + ~IdManager(); // Maps a client_id to a service_id. Return false if the client_id or // service_id are already mapped to something else. diff --git a/gpu/command_buffer/service/program_manager.cc b/gpu/command_buffer/service/program_manager.cc index 3460019..c19806a 100644 --- a/gpu/command_buffer/service/program_manager.cc +++ b/gpu/command_buffer/service/program_manager.cc @@ -27,12 +27,30 @@ static int ShaderTypeToIndex(GLenum shader_type) { } } + +ProgramManager::ProgramInfo::UniformInfo::UniformInfo(GLsizei _size, + GLenum _type, + const std::string& _name) + : size(_size), + type(_type), + name(_name) { +} + +ProgramManager::ProgramInfo::UniformInfo::~UniformInfo() {} + bool ProgramManager::IsInvalidPrefix(const char* name, size_t length) { static const char kInvalidPrefix[] = { 'g', 'l', '_' }; return (length >= sizeof(kInvalidPrefix) && memcmp(name, kInvalidPrefix, sizeof(kInvalidPrefix)) == 0); } +ProgramManager::ProgramInfo::ProgramInfo(GLuint service_id) + : max_attrib_name_length_(0), + max_uniform_name_length_(0), + service_id_(service_id), + valid_(false) { +} + void ProgramManager::ProgramInfo::Reset() { valid_ = false; max_uniform_name_length_ = 0; @@ -320,6 +338,10 @@ bool ProgramManager::ProgramInfo::CanLink() const { return true; } +ProgramManager::ProgramInfo::~ProgramInfo() {} + +ProgramManager::ProgramManager() {} + ProgramManager::~ProgramManager() { DCHECK(program_infos_.empty()); } diff --git a/gpu/command_buffer/service/program_manager.h b/gpu/command_buffer/service/program_manager.h index a10ba61..7fb6fa4 100644 --- a/gpu/command_buffer/service/program_manager.h +++ b/gpu/command_buffer/service/program_manager.h @@ -32,11 +32,9 @@ class ProgramManager { static const int kMaxAttachedShaders = 2; struct UniformInfo { - UniformInfo(GLsizei _size, GLenum _type, const std::string& _name) - : size(_size), - type(_type), - name(_name) { - } + UniformInfo(GLsizei _size, GLenum _type, const std::string& _name); + ~UniformInfo(); + bool IsSampler() const { return type == GL_SAMPLER_2D || type == GL_SAMPLER_CUBE; } @@ -66,12 +64,7 @@ class ProgramManager { typedef std::vector<VertexAttribInfo> AttribInfoVector; typedef std::vector<int> SamplerIndices; - explicit ProgramInfo(GLuint service_id) - : max_attrib_name_length_(0), - max_uniform_name_length_(0), - service_id_(service_id), - valid_(false) { - } + explicit ProgramInfo(GLuint service_id); GLuint service_id() const { return service_id_; @@ -154,7 +147,7 @@ class ProgramManager { friend class base::RefCounted<ProgramInfo>; friend class ProgramManager; - ~ProgramInfo() { } + ~ProgramInfo(); void MarkAsDeleted() { service_id_ = 0; @@ -195,7 +188,7 @@ class ProgramManager { std::string log_info_; }; - ProgramManager() { } + ProgramManager(); ~ProgramManager(); // Must call before destruction. diff --git a/gpu/command_buffer/service/renderbuffer_manager.cc b/gpu/command_buffer/service/renderbuffer_manager.cc index 88a2d26..954c00c 100644 --- a/gpu/command_buffer/service/renderbuffer_manager.cc +++ b/gpu/command_buffer/service/renderbuffer_manager.cc @@ -10,6 +10,8 @@ namespace gpu { namespace gles2 { +RenderbufferManager::RenderbufferManager() {} + RenderbufferManager::~RenderbufferManager() { DCHECK(renderbuffer_infos_.empty()); } diff --git a/gpu/command_buffer/service/renderbuffer_manager.h b/gpu/command_buffer/service/renderbuffer_manager.h index 939ed3f..d3fbaa8 100644 --- a/gpu/command_buffer/service/renderbuffer_manager.h +++ b/gpu/command_buffer/service/renderbuffer_manager.h @@ -74,7 +74,7 @@ class RenderbufferManager { GLenum internal_format_; }; - RenderbufferManager() { } + RenderbufferManager(); ~RenderbufferManager(); // Must call before destruction. diff --git a/gpu/command_buffer/service/shader_manager.cc b/gpu/command_buffer/service/shader_manager.cc index eb4a899..2f82ea4 100644 --- a/gpu/command_buffer/service/shader_manager.cc +++ b/gpu/command_buffer/service/shader_manager.cc @@ -8,6 +8,8 @@ namespace gpu { namespace gles2 { +ShaderManager::ShaderManager() {} + ShaderManager::~ShaderManager() { DCHECK(shader_infos_.empty()); } diff --git a/gpu/command_buffer/service/shader_manager.h b/gpu/command_buffer/service/shader_manager.h index d9b8c46..e056a3e 100644 --- a/gpu/command_buffer/service/shader_manager.h +++ b/gpu/command_buffer/service/shader_manager.h @@ -91,7 +91,7 @@ class ShaderManager { std::string log_info_; }; - ShaderManager() { } + ShaderManager(); ~ShaderManager(); // Must call before destruction. diff --git a/media/base/filters.cc b/media/base/filters.cc index d6fb31e..2ade8d2 100644 --- a/media/base/filters.cc +++ b/media/base/filters.cc @@ -79,4 +79,12 @@ MediaFilter::~MediaFilter() {} DemuxerStream::~DemuxerStream() {} +VideoDecoder::VideoDecoder() {} + +VideoDecoder::~VideoDecoder() {} + +AudioDecoder::AudioDecoder() {} + +AudioDecoder::~AudioDecoder() {} + } // namespace media diff --git a/media/base/filters.h b/media/base/filters.h index 65a33ee..d9edfc1 100644 --- a/media/base/filters.h +++ b/media/base/filters.h @@ -270,6 +270,9 @@ class VideoDecoder : public MediaFilter { consume_video_frame_callback_->Run(frame); } + VideoDecoder(); + virtual ~VideoDecoder(); + private: scoped_ptr<ConsumeVideoFrameCallback> consume_video_frame_callback_; }; @@ -309,6 +312,10 @@ class AudioDecoder : public MediaFilter { // We could also pass empty pointer here to let decoder provide buffers pool. virtual void ProduceAudioSamples(scoped_refptr<Buffer> buffer) = 0; + protected: + AudioDecoder(); + ~AudioDecoder(); + private: scoped_ptr<ConsumeAudioSamplesCallback> consume_audio_samples_callback_; }; diff --git a/webkit/glue/media/video_renderer_impl.cc b/webkit/glue/media/video_renderer_impl.cc index 6d7323d..bc3779d 100644 --- a/webkit/glue/media/video_renderer_impl.cc +++ b/webkit/glue/media/video_renderer_impl.cc @@ -20,6 +20,8 @@ VideoRendererImpl::VideoRendererImpl(WebMediaPlayerImpl::Proxy* proxy, proxy_->SetVideoRenderer(this); } +VideoRendererImpl::~VideoRendererImpl() {} + // static media::FilterFactory* VideoRendererImpl::CreateFactory( WebMediaPlayerImpl::Proxy* proxy, diff --git a/webkit/glue/media/video_renderer_impl.h b/webkit/glue/media/video_renderer_impl.h index 39ce1b2..38e88514 100644 --- a/webkit/glue/media/video_renderer_impl.h +++ b/webkit/glue/media/video_renderer_impl.h @@ -73,7 +73,7 @@ class VideoRendererImpl : public WebVideoRenderer { WebMediaPlayerImpl::Proxy*, bool>; VideoRendererImpl(WebMediaPlayerImpl::Proxy* proxy, bool pts_logging); - virtual ~VideoRendererImpl() {} + virtual ~VideoRendererImpl(); // Determine the conditions to perform fast paint. Returns true if we can do // fast paint otherwise false. |