diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-11 22:25:42 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-11 22:25:42 +0000 |
commit | 6fd279703048008896e8036090d6308605b46202 (patch) | |
tree | d8f71b855fb5e6cbd8d8d50ff55036d9e60d4d89 /webkit/api | |
parent | f6fb685b1a3c2a4dbf6112f7313f75761cae34d1 (diff) | |
download | chromium_src-6fd279703048008896e8036090d6308605b46202.zip chromium_src-6fd279703048008896e8036090d6308605b46202.tar.gz chromium_src-6fd279703048008896e8036090d6308605b46202.tar.bz2 |
Add protected destructors to interface types that should only be deleted via a
subclass. There's no reason for these to be virtual since they can only be
called by a subclass.
R=jorlow
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/165312
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23100 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/api')
-rw-r--r-- | webkit/api/public/WebClipboard.h | 11 | ||||
-rw-r--r-- | webkit/api/public/WebDataSource.h | 3 | ||||
-rw-r--r-- | webkit/api/public/WebFrame.h | 3 | ||||
-rw-r--r-- | webkit/api/public/WebHTTPHeaderVisitor.h | 3 | ||||
-rw-r--r-- | webkit/api/public/WebKitClient.h | 3 | ||||
-rw-r--r-- | webkit/api/public/WebMediaPlayerClient.h | 9 | ||||
-rw-r--r-- | webkit/api/public/WebMessagePortChannel.h | 2 | ||||
-rw-r--r-- | webkit/api/public/WebMessagePortChannelClient.h | 3 | ||||
-rw-r--r-- | webkit/api/public/WebMimeRegistry.h | 3 | ||||
-rw-r--r-- | webkit/api/public/WebSettings.h | 2 | ||||
-rw-r--r-- | webkit/api/public/WebURLLoaderClient.h | 3 | ||||
-rw-r--r-- | webkit/api/public/WebWidget.h | 3 | ||||
-rw-r--r-- | webkit/api/public/WebWidgetClient.h | 3 | ||||
-rw-r--r-- | webkit/api/public/WebWorkerClient.h | 5 |
14 files changed, 44 insertions, 12 deletions
diff --git a/webkit/api/public/WebClipboard.h b/webkit/api/public/WebClipboard.h index 8830088..311800b 100644 --- a/webkit/api/public/WebClipboard.h +++ b/webkit/api/public/WebClipboard.h @@ -1,10 +1,10 @@ /* * Copyright (C) 2009 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -46,8 +46,6 @@ namespace WebKit { FormatSmartPaste }; - virtual ~WebClipboard() {} - virtual bool isFormatAvailable(Format) = 0; virtual WebString readPlainText() = 0; @@ -60,6 +58,9 @@ namespace WebKit { const WebURL&, const WebString& title) = 0; virtual void writeImage( const WebImage&, const WebURL&, const WebString& title) = 0; + + protected: + ~WebClipboard() {} }; } // namespace WebKit diff --git a/webkit/api/public/WebDataSource.h b/webkit/api/public/WebDataSource.h index 66681da..cbc99d2 100644 --- a/webkit/api/public/WebDataSource.h +++ b/webkit/api/public/WebDataSource.h @@ -89,6 +89,9 @@ namespace WebKit { // extra data pointer to be deleted. virtual ExtraData* extraData() const = 0; virtual void setExtraData(ExtraData*) = 0; + + protected: + ~WebDataSource() { } }; } // namespace WebKit diff --git a/webkit/api/public/WebFrame.h b/webkit/api/public/WebFrame.h index 954c379..bb5be9c 100644 --- a/webkit/api/public/WebFrame.h +++ b/webkit/api/public/WebFrame.h @@ -420,6 +420,9 @@ namespace WebKit { // Returns HTML text for the contents of this frame. This is generated // from the DOM. virtual WebString contentAsMarkup() const = 0; + + protected: + ~WebFrame() { } }; } // namespace WebKit diff --git a/webkit/api/public/WebHTTPHeaderVisitor.h b/webkit/api/public/WebHTTPHeaderVisitor.h index b61d3da..5aea740 100644 --- a/webkit/api/public/WebHTTPHeaderVisitor.h +++ b/webkit/api/public/WebHTTPHeaderVisitor.h @@ -37,6 +37,9 @@ namespace WebKit { class WebHTTPHeaderVisitor { public: virtual void visitHeader(const WebString& name, const WebString& value) = 0; + + protected: + ~WebHTTPHeaderVisitor() { } }; } // namespace WebKit diff --git a/webkit/api/public/WebKitClient.h b/webkit/api/public/WebKitClient.h index 2757a96..0eaf4da 100644 --- a/webkit/api/public/WebKitClient.h +++ b/webkit/api/public/WebKitClient.h @@ -209,6 +209,9 @@ namespace WebKit { // Callable from a background WebKit thread. virtual void callOnMainThread(void (*func)()) = 0; + + protected: + ~WebKitClient() { } }; } // namespace WebKit diff --git a/webkit/api/public/WebMediaPlayerClient.h b/webkit/api/public/WebMediaPlayerClient.h index e398149..74d7af1 100644 --- a/webkit/api/public/WebMediaPlayerClient.h +++ b/webkit/api/public/WebMediaPlayerClient.h @@ -1,10 +1,10 @@ /* * Copyright (C) 2009 Google Inc. All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -47,6 +47,9 @@ namespace WebKit { virtual void rateChanged() = 0; virtual void sizeChanged() = 0; virtual void sawUnsupportedTracks() = 0; + + protected: + ~WebMediaPlayerClient() { } }; } // namespace WebKit diff --git a/webkit/api/public/WebMessagePortChannel.h b/webkit/api/public/WebMessagePortChannel.h index 9ad521c..ef20df4 100644 --- a/webkit/api/public/WebMessagePortChannel.h +++ b/webkit/api/public/WebMessagePortChannel.h @@ -50,7 +50,7 @@ namespace WebKit { virtual bool tryGetMessage(WebString*, WebMessagePortChannel**) = 0; protected: - virtual ~WebMessagePortChannel() { } + ~WebMessagePortChannel() { } }; } // namespace WebKit diff --git a/webkit/api/public/WebMessagePortChannelClient.h b/webkit/api/public/WebMessagePortChannelClient.h index af20d9a..1696b08 100644 --- a/webkit/api/public/WebMessagePortChannelClient.h +++ b/webkit/api/public/WebMessagePortChannelClient.h @@ -41,8 +41,9 @@ namespace WebKit { // WebMessagePortChannel::tryGetMessage. Note that this may be called // on any thread. virtual void messageAvailable() = 0; + protected: - virtual ~WebMessagePortChannelClient() { } + ~WebMessagePortChannelClient() { } }; } // namespace WebKit diff --git a/webkit/api/public/WebMimeRegistry.h b/webkit/api/public/WebMimeRegistry.h index 8707f3f..e85b9cd 100644 --- a/webkit/api/public/WebMimeRegistry.h +++ b/webkit/api/public/WebMimeRegistry.h @@ -49,6 +49,9 @@ namespace WebKit { virtual WebString mimeTypeForExtension(const WebString& fileExtension) = 0; virtual WebString mimeTypeFromFile(const WebString& filePath) = 0; virtual WebString preferredExtensionForMIMEType(const WebString& mimeType) = 0; + + protected: + ~WebMimeRegistry() { } }; } // namespace WebKit diff --git a/webkit/api/public/WebSettings.h b/webkit/api/public/WebSettings.h index eaabf43..d0af35e 100644 --- a/webkit/api/public/WebSettings.h +++ b/webkit/api/public/WebSettings.h @@ -80,7 +80,7 @@ namespace WebKit { virtual void setTextDirectionSubmenuInclusionBehaviorNeverIncluded() = 0; protected: - virtual ~WebSettings() { } + ~WebSettings() { } }; } // namespace WebKit diff --git a/webkit/api/public/WebURLLoaderClient.h b/webkit/api/public/WebURLLoaderClient.h index 5e7d4e2..07f20bb 100644 --- a/webkit/api/public/WebURLLoaderClient.h +++ b/webkit/api/public/WebURLLoaderClient.h @@ -60,6 +60,9 @@ namespace WebKit { // Called when the load completes with an error. virtual void didFail(WebURLLoader*, const WebURLError&) = 0; + + protected: + ~WebURLLoaderClient() { } }; } // namespace WebKit diff --git a/webkit/api/public/WebWidget.h b/webkit/api/public/WebWidget.h index 262ac79..9d885e4 100644 --- a/webkit/api/public/WebWidget.h +++ b/webkit/api/public/WebWidget.h @@ -88,6 +88,9 @@ namespace WebKit { // Changes the text direction of the selected input node. virtual void setTextDirection(WebTextDirection) = 0; + + protected: + ~WebWidget() { } }; } // namespace WebKit diff --git a/webkit/api/public/WebWidgetClient.h b/webkit/api/public/WebWidgetClient.h index 7ac0a6a..8479bb6 100644 --- a/webkit/api/public/WebWidgetClient.h +++ b/webkit/api/public/WebWidgetClient.h @@ -81,6 +81,9 @@ namespace WebKit { // Called to query information about the screen where this widget is // displayed. virtual WebScreenInfo screenInfo() = 0; + + protected: + ~WebWidgetClient() { } }; } // namespace WebKit diff --git a/webkit/api/public/WebWorkerClient.h b/webkit/api/public/WebWorkerClient.h index 30c2afb..3e89ed7 100644 --- a/webkit/api/public/WebWorkerClient.h +++ b/webkit/api/public/WebWorkerClient.h @@ -65,7 +65,10 @@ namespace WebKit { virtual void workerContextDestroyed() = 0; // This can be called on any thread to create a nested worker. - virtual WebKit::WebWorker* createWorker(WebKit::WebWorkerClient* client) = 0; + virtual WebWorker* createWorker(WebWorkerClient* client) = 0; + + protected: + ~WebWorkerClient() { } }; } // namespace WebKit |