diff options
Diffstat (limited to 'content')
17 files changed, 53 insertions, 29 deletions
diff --git a/content/browser/device_orientation/provider.h b/content/browser/device_orientation/provider.h index a44128c..39ec860 100644 --- a/content/browser/device_orientation/provider.h +++ b/content/browser/device_orientation/provider.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -20,6 +20,9 @@ class CONTENT_EXPORT Provider : public base::RefCountedThreadSafe<Provider> { // An Observer must not synchronously call Provider::RemoveObserver // or Provider::AddObserver when this is called. virtual void OnOrientationUpdate(const Orientation& orientation) = 0; + + protected: + virtual ~Observer() {} }; // Returns a pointer to the singleton instance of this class. diff --git a/content/browser/download/download_item_impl.h b/content/browser/download/download_item_impl.h index 1f72f5ef..7975085 100644 --- a/content/browser/download/download_item_impl.h +++ b/content/browser/download/download_item_impl.h @@ -37,7 +37,6 @@ class CONTENT_EXPORT DownloadItemImpl : public content::DownloadItem { class CONTENT_EXPORT Delegate { public: Delegate(); - virtual ~Delegate(); // Used for catching use-after-free errors. void Attach(); @@ -75,6 +74,9 @@ class CONTENT_EXPORT DownloadItemImpl : public content::DownloadItem { // Assert consistent state for delgate object at various transitions. virtual void AssertStateConsistent(DownloadItem* download) const = 0; + protected: + virtual ~Delegate(); + private: // For "Outlives attached DownloadItemImpl" invariant assertion. int count_; diff --git a/content/browser/pepper_flash_settings_helper_impl.h b/content/browser/pepper_flash_settings_helper_impl.h index bfecc00..2c29deb 100644 --- a/content/browser/pepper_flash_settings_helper_impl.h +++ b/content/browser/pepper_flash_settings_helper_impl.h @@ -15,7 +15,7 @@ namespace content { class CONTENT_EXPORT PepperFlashSettingsHelperImpl : public PepperFlashSettingsHelper, - public PpapiPluginProcessHost::BrokerClient { + NON_EXPORTED_BASE(public PpapiPluginProcessHost::BrokerClient) { public: PepperFlashSettingsHelperImpl(); diff --git a/content/browser/ppapi_plugin_process_host.h b/content/browser/ppapi_plugin_process_host.h index e3bd540..0c6fe0b 100644 --- a/content/browser/ppapi_plugin_process_host.h +++ b/content/browser/ppapi_plugin_process_host.h @@ -52,15 +52,23 @@ class PpapiPluginProcessHost : public content::BrowserChildProcessHostDelegate, // Returns true if the current connection is off-the-record. virtual bool OffTheRecord() = 0; + + protected: + virtual ~Client() {} }; class PluginClient : public Client { public: // Returns the resource context for the renderer requesting the channel. virtual content::ResourceContext* GetResourceContext() = 0; + + protected: + virtual ~PluginClient() {} }; class BrokerClient : public Client { + protected: + virtual ~BrokerClient() {} }; virtual ~PpapiPluginProcessHost(); diff --git a/content/browser/renderer_host/media/audio_input_device_manager_event_handler.h b/content/browser/renderer_host/media/audio_input_device_manager_event_handler.h index 163aa6d..a95533a 100644 --- a/content/browser/renderer_host/media/audio_input_device_manager_event_handler.h +++ b/content/browser/renderer_host/media/audio_input_device_manager_event_handler.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -24,6 +24,7 @@ class CONTENT_EXPORT AudioInputDeviceManagerEventHandler { // calling Stop() on a started device. virtual void OnDeviceStopped(int session_id) = 0; + protected: virtual ~AudioInputDeviceManagerEventHandler() {} }; diff --git a/content/browser/ssl/ssl_error_handler.h b/content/browser/ssl/ssl_error_handler.h index 3063d16..a84f9fd 100644 --- a/content/browser/ssl/ssl_error_handler.h +++ b/content/browser/ssl/ssl_error_handler.h @@ -60,6 +60,9 @@ class SSLErrorHandler : public base::RefCountedThreadSafe<SSLErrorHandler> { // Called when SSLErrorHandler decides to continue the request despite the // SSL error. virtual void ContinueSSLRequest(const content::GlobalRequestID& id) = 0; + + protected: + virtual ~Delegate() {} }; virtual SSLCertErrorHandler* AsSSLCertErrorHandler(); diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h index 704c073..6f4450b 100644 --- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h +++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h @@ -58,10 +58,12 @@ using WebKit::WGC3Dsizeiptr; // context... class WebGraphicsContext3DSwapBuffersClient { public: - virtual ~WebGraphicsContext3DSwapBuffersClient() { } virtual void OnViewContextSwapBuffersPosted() = 0; virtual void OnViewContextSwapBuffersComplete() = 0; virtual void OnViewContextSwapBuffersAborted() = 0; + + protected: + virtual ~WebGraphicsContext3DSwapBuffersClient() {} }; class WebGraphicsContext3DErrorMessageCallback; diff --git a/content/common/gpu/gpu_command_buffer_stub.h b/content/common/gpu/gpu_command_buffer_stub.h index eeb3c9b..aa30711 100644 --- a/content/common/gpu/gpu_command_buffer_stub.h +++ b/content/common/gpu/gpu_command_buffer_stub.h @@ -83,10 +83,11 @@ class GpuCommandBufferStub public: class DestructionObserver { public: - ~DestructionObserver() {} - // Called in Destroy(), before the context/surface are released. virtual void OnWillDestroyStub(GpuCommandBufferStub* stub) = 0; + + protected: + virtual ~DestructionObserver() {} }; GpuCommandBufferStub( diff --git a/content/common/gpu/gpu_watchdog.h b/content/common/gpu/gpu_watchdog.h index 4d20b0d..bc421ce 100644 --- a/content/common/gpu/gpu_watchdog.h +++ b/content/common/gpu/gpu_watchdog.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -9,14 +9,12 @@ // GPUProcessor will regularly invoke CheckArmed. class GpuWatchdog { public: - GpuWatchdog() { - } - - virtual ~GpuWatchdog() { - }; - virtual void CheckArmed() = 0; + protected: + GpuWatchdog() {} + virtual ~GpuWatchdog() {}; + private: DISALLOW_COPY_AND_ASSIGN(GpuWatchdog); }; diff --git a/content/common/gpu/image_transport_surface.h b/content/common/gpu/image_transport_surface.h index 66c3b8e..a9be78f 100644 --- a/content/common/gpu/image_transport_surface.h +++ b/content/common/gpu/image_transport_surface.h @@ -59,7 +59,6 @@ class GLES2Decoder; class ImageTransportSurface { public: ImageTransportSurface(); - virtual ~ImageTransportSurface(); virtual void OnNewSurfaceACK( uint64 surface_id, TransportDIB::Handle surface_handle) = 0; @@ -80,6 +79,9 @@ class ImageTransportSurface { const gfx::Rect& new_damage_rect, std::vector<gfx::Rect>* regions); + protected: + virtual ~ImageTransportSurface(); + private: DISALLOW_COPY_AND_ASSIGN(ImageTransportSurface); }; diff --git a/content/public/browser/download_manager_delegate.cc b/content/public/browser/download_manager_delegate.cc index fb911b0..bb177c1 100644 --- a/content/public/browser/download_manager_delegate.cc +++ b/content/public/browser/download_manager_delegate.cc @@ -9,9 +9,6 @@ namespace content { -DownloadManagerDelegate::~DownloadManagerDelegate() { -} - DownloadId DownloadManagerDelegate::GetNextId() { return DownloadId::Invalid(); } @@ -50,4 +47,6 @@ bool DownloadManagerDelegate::GenerateFileHash() { return false; } +DownloadManagerDelegate::~DownloadManagerDelegate() {} + } // namespace content diff --git a/content/public/browser/download_manager_delegate.h b/content/public/browser/download_manager_delegate.h index 84a5db6..7f37f10b 100644 --- a/content/public/browser/download_manager_delegate.h +++ b/content/public/browser/download_manager_delegate.h @@ -36,8 +36,6 @@ typedef base::Callback<void(const FilePath&, // Browser's download manager: manages all downloads and destination view. class CONTENT_EXPORT DownloadManagerDelegate { public: - virtual ~DownloadManagerDelegate(); - // Lets the delegate know that the download manager is shutting down. virtual void Shutdown() {} @@ -133,6 +131,9 @@ class CONTENT_EXPORT DownloadManagerDelegate { bool can_save_as_complete, const SavePackagePathPickedCallback& callback) { } + + protected: + virtual ~DownloadManagerDelegate(); }; } // namespace content diff --git a/content/public/browser/profiler_subscriber.h b/content/public/browser/profiler_subscriber.h index f6679d9..ca83643 100644 --- a/content/public/browser/profiler_subscriber.h +++ b/content/public/browser/profiler_subscriber.h @@ -17,8 +17,6 @@ namespace content { // Objects interested in receiving profiler data derive from ProfilerSubscriber. class CONTENT_EXPORT ProfilerSubscriber { public: - virtual ~ProfilerSubscriber() {} - // Send number of pending processes to subscriber. |end| is set to true if it // is the last time. This is called on the UI thread. virtual void OnPendingProcesses(int sequence_number, @@ -31,6 +29,9 @@ class CONTENT_EXPORT ProfilerSubscriber { int sequence_number, const tracked_objects::ProcessDataSnapshot& profiler_data, ProcessType process_type) = 0; + + protected: + virtual ~ProfilerSubscriber() {} }; } // namespace content diff --git a/content/public/browser/worker_service_observer.h b/content/public/browser/worker_service_observer.h index e090511..213a9e6 100644 --- a/content/public/browser/worker_service_observer.h +++ b/content/public/browser/worker_service_observer.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -15,13 +15,14 @@ namespace content { class WorkerServiceObserver { public: - virtual ~WorkerServiceObserver() {} - virtual void WorkerCreated(const GURL& url, const string16& name, int process_id, int route_id) {} virtual void WorkerDestroyed(int process_id, int route_id) {} + + protected: + virtual ~WorkerServiceObserver() {} }; } // namespace content diff --git a/content/public/renderer/render_view.h b/content/public/renderer/render_view.h index c09a527..a57ba9a 100644 --- a/content/public/renderer/render_view.h +++ b/content/public/renderer/render_view.h @@ -49,8 +49,6 @@ class CONTENT_EXPORT RenderView : public IPC::Sender { // been closed but not yet destroyed are excluded). static void ForEach(RenderViewVisitor* visitor); - virtual ~RenderView() {} - // Get the routing ID of the view. virtual int GetRoutingID() const = 0; @@ -128,6 +126,9 @@ class CONTENT_EXPORT RenderView : public IPC::Sender { WebKit::WebFrame* frame, const WebKit::WebURLRequest& request, WebKit::WebNavigationPolicy policy) = 0; + + protected: + virtual ~RenderView() {} }; } // namespace content diff --git a/content/renderer/media/scoped_loop_observer.h b/content/renderer/media/scoped_loop_observer.h index 127d992..6819652 100644 --- a/content/renderer/media/scoped_loop_observer.h +++ b/content/renderer/media/scoped_loop_observer.h @@ -24,9 +24,10 @@ class ScopedLoopObserver : public MessageLoop::DestructionObserver { public: explicit ScopedLoopObserver(MessageLoop* message_loop); - virtual ~ScopedLoopObserver(); protected: + virtual ~ScopedLoopObserver(); + // Accessor to the loop that's used by the derived class. base::MessageLoopProxy* message_loop() { return loop_; } diff --git a/content/renderer/pepper/pepper_parent_context_provider.h b/content/renderer/pepper/pepper_parent_context_provider.h index 48243d8..f9c64c2 100644 --- a/content/renderer/pepper/pepper_parent_context_provider.h +++ b/content/renderer/pepper/pepper_parent_context_provider.h @@ -16,12 +16,12 @@ namespace content { // parent context for display to the screen. class PepperParentContextProvider { public: - virtual ~PepperParentContextProvider(); virtual WebGraphicsContext3DCommandBufferImpl* GetParentContextForPlatformContext3D() = 0; protected: PepperParentContextProvider(); + virtual ~PepperParentContextProvider(); private: DISALLOW_COPY_AND_ASSIGN(PepperParentContextProvider); |