Skip to content

Commit

Permalink
GTTF: Add missing virtual destructors.
Browse files Browse the repository at this point in the history
R=jar
TBR=darin,satorux,fischman,jamesr,sky

BUG=45135

Review URL: https://codereview.chromium.org/12086018

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180669 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
phajdan.jr@chromium.org committed Feb 5, 2013
1 parent f9644cc commit 0672752
Show file tree
Hide file tree
Showing 56 changed files with 119 additions and 15 deletions.
2 changes: 2 additions & 0 deletions ash/wm/system_modal_container_event_filter_delegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ namespace internal {

class ASH_EXPORT SystemModalContainerEventFilterDelegate {
public:
virtual ~SystemModalContainerEventFilterDelegate() { }

// Returns true if |window| can receive the specified event.
virtual bool CanWindowReceiveEvents(aura::Window* window) = 0;
};
Expand Down
2 changes: 2 additions & 0 deletions base/debug/trace_event_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ class BASE_EXPORT TraceLog {
// on-demand.
class EnabledStateChangedObserver {
public:
virtual ~EnabledStateChangedObserver() { }

// Called just before the tracing system becomes
// enabled. TraceLog::IsEnabled will return false at this point and trace
// macros and methods called within the observer will deadlock.
Expand Down
2 changes: 2 additions & 0 deletions base/prefs/pref_observer.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ class PrefServiceBase;
// TODO(joi): Switch to base::Callback and remove this.
class PrefObserver {
public:
virtual ~PrefObserver() { }

virtual void OnPreferenceChanged(PrefServiceBase* service,
const std::string& pref_name) = 0;
};
Expand Down
3 changes: 2 additions & 1 deletion base/prefs/public/pref_change_registrar.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ class PrefServiceBase;
// with a PrefStore. Functions much like NotificationRegistrar, but specifically
// manages observers of preference changes. When the Registrar is destroyed,
// all registered observers are automatically unregistered with the PrefStore.
class BASE_PREFS_EXPORT PrefChangeRegistrar : public PrefObserver {
class BASE_PREFS_EXPORT PrefChangeRegistrar
: public NON_EXPORTED_BASE(PrefObserver) {
public:
// You can register this type of callback if you need to know the
// path of the preference that is changing.
Expand Down
3 changes: 2 additions & 1 deletion base/prefs/public/pref_member.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ class PrefServiceBase;

namespace subtle {

class BASE_PREFS_EXPORT PrefMemberBase : public PrefObserver {
class BASE_PREFS_EXPORT PrefMemberBase
: public NON_EXPORTED_BASE(PrefObserver) {
public:
// Type of callback you can register if you need to know the name of
// the pref that is changing.
Expand Down
2 changes: 2 additions & 0 deletions base/threading/post_task_and_reply_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ namespace internal {
// may want base::WorkerPool.
class PostTaskAndReplyImpl {
public:
virtual ~PostTaskAndReplyImpl() { }

// Implementation for MessageLoopProxy::PostTaskAndReply and
// WorkerPool::PostTaskAndReply.
bool PostTaskAndReply(const tracked_objects::Location& from_here,
Expand Down
3 changes: 3 additions & 0 deletions cc/layer_animation_event_observer.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ namespace cc {
class CC_EXPORT LayerAnimationEventObserver {
public:
virtual void OnAnimationStarted(const AnimationEvent& event) = 0;

protected:
virtual ~LayerAnimationEventObserver() { }
};

} // namespace cc
Expand Down
4 changes: 2 additions & 2 deletions cc/layer_tree_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ struct CC_EXPORT RendererCapabilities {
int maxTextureSize;
};

class CC_EXPORT LayerTreeHost : public RateLimiterClient {
class CC_EXPORT LayerTreeHost : public NON_EXPORTED_BASE(RateLimiterClient) {
public:
static scoped_ptr<LayerTreeHost> create(LayerTreeHostClient*, const LayerTreeSettings&, scoped_ptr<Thread> implThread);
virtual ~LayerTreeHost();
Expand Down Expand Up @@ -218,7 +218,7 @@ class CC_EXPORT LayerTreeHost : public RateLimiterClient {
void updateLayers(Layer*, ResourceUpdateQueue&);
void triggerPrepaint();

void prioritizeTextures(const LayerList&, OverdrawMetrics&);
void prioritizeTextures(const LayerList&, OverdrawMetrics&);
void setPrioritiesForSurfaces(size_t surfaceMemoryBytes);
void setPrioritiesForLayers(const LayerList&);
size_t calculateMemoryForRenderSurfaces(const LayerList& updateList);
Expand Down
5 changes: 4 additions & 1 deletion cc/layer_tree_host_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ class LayerTreeHostImplClient {
virtual void sendManagedMemoryStats() = 0;
virtual bool isInsideDraw() = 0;
virtual void renewTreePriority() = 0;

protected:
virtual ~LayerTreeHostImplClient() { }
};

// LayerTreeHostImpl owns the LayerImpl tree as well as associated rendering state
Expand Down Expand Up @@ -93,7 +96,7 @@ class CC_EXPORT LayerTreeHostImpl : public InputHandlerClient,

struct CC_EXPORT FrameData : public RenderPassSink {
FrameData();
~FrameData();
virtual ~FrameData();

std::vector<gfx::Rect> occludingScreenSpaceRects;
std::vector<gfx::Rect> nonOccludingScreenSpaceRects;
Expand Down
5 changes: 3 additions & 2 deletions cc/picture_layer_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ namespace cc {
struct AppendQuadsData;
class QuadSink;

class CC_EXPORT PictureLayerImpl : public LayerImpl,
public PictureLayerTilingClient {
class CC_EXPORT PictureLayerImpl
: public LayerImpl,
public NON_EXPORTED_BASE(PictureLayerTilingClient) {
public:
static scoped_ptr<PictureLayerImpl> create(LayerTreeImpl* treeImpl, int id)
{
Expand Down
3 changes: 3 additions & 0 deletions cc/picture_layer_tiling.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ class PictureLayerTilingClient {
virtual gfx::Size CalculateTileSize(
gfx::Size current_tile_size,
gfx::Size content_bounds) = 0;

protected:
virtual ~PictureLayerTilingClient() { }
};

class CC_EXPORT PictureLayerTiling {
Expand Down
3 changes: 3 additions & 0 deletions cc/rate_limiter.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ class Thread;
class RateLimiterClient {
public:
virtual void rateLimit() = 0;

protected:
virtual ~RateLimiterClient() { }
};

// A RateLimiter can be used to make sure that a single context does not dominate all execution time.
Expand Down
3 changes: 3 additions & 0 deletions cc/video_frame_provider.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ class VideoFrameProvider {

// Notifies the provider's client of a new UV transform matrix to be used.
virtual void DidUpdateMatrix(const float*) = 0;

protected:
virtual ~Client() { }
};

// May be called from any thread, but there must be some external guarantee
Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/certificate_manager_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ class CertificateManagerModel {

class Observer {
public:
virtual ~Observer() { }

// Called to notify the view that the certificate list has been refreshed.
// TODO(mattm): do a more granular updating strategy? Maybe retrieve new
// list of certs, diff against past list, and then notify of the changes?
Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/download/download_danger_prompt.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ class DownloadDangerPrompt {
CANCEL
};

virtual ~DownloadDangerPrompt() { }

// Return a new self-deleting DownloadDangerPrompt. |accepted| or |canceled|
// will be run when the the respective action is invoked. |canceled| may also
// be called when |item| is either no longer dangerous or no longer in
Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/extensions/activity_log.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ class ActivityLog : public ProfileKeyedService,
// Observers can listen for activity events.
class Observer {
public:
virtual ~Observer() { }

virtual void OnExtensionActivity(
const Extension* extension,
Activity activity,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ namespace api {

class EntryPickerClient {
public:
virtual ~EntryPickerClient() { }

virtual void FileSelected(const FilePath& path) = 0;
virtual void FileSelectionCanceled() = 0;
};
Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/extensions/api/page_capture/page_capture_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ class PageCaptureSaveAsMHTMLFunction : public AsyncExtensionFunction {
// Test specific delegate used to test that the temporary file gets deleted.
class TestDelegate {
public:
virtual ~TestDelegate() { }

// Called on the UI thread when the temporary file that contains the
// generated data has been created.
virtual void OnTemporaryFileCreated(const base::FilePath& temp_file) = 0;
Expand Down
4 changes: 4 additions & 0 deletions chrome/browser/extensions/app_notify_channel_setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ class AppNotifyChannelSetup

class Delegate {
public:
virtual ~Delegate() { }

// If successful, |channel_id| will be non-empty. On failure, |channel_id|
// will be empty and |error| will contain an error to report to the JS
// callback.
Expand All @@ -64,6 +66,8 @@ class AppNotifyChannelSetup
// forcing the return of a certain result to the delegate.
class InterceptorForTests {
public:
virtual ~InterceptorForTests() { }

virtual void DoIntercept(
const AppNotifyChannelSetup* setup,
std::string* result_channel_id,
Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/extensions/event_router.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ class EventRouter : public content::NotificationObserver,
// notified when a listener is added or removed for that |event_name|.
class Observer {
public:
virtual ~Observer() {}

// Called when a listener is added.
virtual void OnListenerAdded(const EventListenerInfo& details) {}
// Called when a listener is removed.
Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/extensions/extension_function.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,8 @@ class UIThreadExtensionFunction : public ExtensionFunction {
// A delegate for use in testing, to intercept the call to SendResponse.
class DelegateForTests {
public:
virtual ~DelegateForTests() { }

virtual void OnSendResponse(UIThreadExtensionFunction* function,
bool success,
bool bad_message) = 0;
Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/extensions/extension_keybinding_registry.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ class ExtensionKeybindingRegistry : public content::NotificationObserver {

class Delegate {
public:
virtual ~Delegate() { }

// Gets the ActiveTabPermissionGranter for the active tab, if any.
// If there is no active tab then returns NULL.
virtual ActiveTabPermissionGranter* GetActiveTabPermissionGranter() = 0;
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/extensions/extension_scoped_prefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class ExtensionScopedPrefs {
public:
ExtensionScopedPrefs() {}
~ExtensionScopedPrefs() {}
virtual ~ExtensionScopedPrefs() {}

// Sets the pref |key| for extension |id| to |value|.
virtual void UpdateExtensionPref(const std::string& id,
Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/extensions/extension_warning_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ class ExtensionWarningService : public content::NotificationObserver,
public:
class Observer {
public:
virtual ~Observer() { }

virtual void ExtensionWarningsChanged() = 0;
};

Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/favicon/favicon_handler_delegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ class NavigationEntry;
// about changes.
class FaviconHandlerDelegate {
public:
virtual ~FaviconHandlerDelegate() { }

// Returns the current NavigationEntry.
virtual content::NavigationEntry* GetActiveEntry() = 0;

Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/google_apis/auth_service_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ typedef base::Callback<void(GDataErrorCode error,
// All functions must be called on UI thread.
class AuthServiceInterface {
public:
virtual ~AuthServiceInterface() { }

// Adds and removes the observer. AddObserver() should be called before
// Initialize() as it can change the refresh token.
virtual void AddObserver(AuthServiceObserver* observer) = 0;
Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/managed_mode/managed_mode_url_filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ class ManagedModeURLFilter

class Observer {
public:
virtual ~Observer() { }

virtual void OnSiteListUpdated() = 0;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ class ResourceRequestAllowedNotifier :
// Observes resource request allowed state changes.
class Observer {
public:
virtual ~Observer() { }

virtual void OnResourceRequestsAllowed() = 0;
};

Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/policy/user_info_fetcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ class UserInfoFetcher : public net::URLFetcherDelegate {
public:
class Delegate {
public:
virtual ~Delegate() { }

// Invoked when the UserInfo request has succeeded, passing the parsed
// response in |response|. Delegate may free the UserInfoFetcher in this
// callback.
Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/profiles/profile.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ class Profile : public content::BrowserContext {

class Delegate {
public:
virtual ~Delegate() {}

// Called when creation of the profile is finished.
virtual void OnProfileCreated(Profile* profile,
bool success,
Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/signin/about_signin_internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ class AboutSigninInternals
public:
class Observer {
public:
virtual ~Observer() { }

// |info| will contain the dictionary of signin_status_ values as indicated
// in the comments for GetSigninStatus() below.
virtual void OnSigninStateChanged(scoped_ptr<DictionaryValue> info) = 0;
Expand Down
3 changes: 2 additions & 1 deletion chrome/browser/signin/signin_internals_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ struct SigninStatus {
// An Observer class for authentication and token diagnostic information.
class SigninDiagnosticsObserver {
public:
virtual ~SigninDiagnosticsObserver() {}

// Credentials and signin related changes.
virtual void NotifySigninValueChanged(const UntimedSigninStatusField& field,
const std::string& value) {}
Expand All @@ -138,7 +140,6 @@ class SigninDiagnosticsObserver {
virtual void NotifyTokenReceivedFailure(const std::string& token_name,
const std::string& error) {}
virtual void NotifyClearStoredToken(const std::string& token_name) {}

};

} // namespace
Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/signin/signin_tracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ class SigninTracker : public ProfileSyncServiceObserver,
public:
class Observer {
public:
virtual ~Observer() { }

// The GAIA credentials entered by the user have been validated.
virtual void GaiaCredentialsValid() = 0;

Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/spellchecker/spellcheck_custom_dictionary.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ class SpellcheckCustomDictionary : public SpellcheckDictionary,
// Interface to implement for dictionary load and change observers.
class Observer {
public:
virtual ~Observer() { }

// Called when the custom dictionary has been loaded.
virtual void OnCustomDictionaryLoaded() = 0;

Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ class SpellcheckHunspellDictionary
// Interface to implement for observers of the Hunspell dictionary.
class Observer {
public:
virtual ~Observer() { }

// The dictionary has been initialized.
virtual void OnHunspellDictionaryInitialized() = 0;

Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/tab_contents/render_view_context_menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ struct WebPluginAction;
//
class RenderViewContextMenuProxy {
public:
virtual ~RenderViewContextMenuProxy() { }

// Add a menu item to a context menu.
virtual void AddMenuItem(int command_id, const string16& title) = 0;
virtual void AddCheckItem(int command_id, const string16& title) = 0;
Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/ui/app_modal_dialogs/native_app_modal_dialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ class JavaScriptAppModalDialog;

class NativeAppModalDialog {
public:
virtual ~NativeAppModalDialog() { }

// Returns the buttons to be shown. See ui::DialogButton for which buttons can
// be returned.
virtual int GetAppModalDialogButtons() const = 0;
Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/ui/autofill/autofill_popup_delegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
// of events by the controller.
class AutofillPopupDelegate {
public:
virtual ~AutofillPopupDelegate() { }

// Called when the autofill suggestion indicated by |identifier| has been
// temporarily selected (e.g., hovered).
virtual void DidSelectSuggestion(int identifier) = 0;
Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/ui/base_window.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ class SkRegion;

class BaseWindow {
public:
virtual ~BaseWindow() { }

// Returns true if the window is currently the active/focused window.
virtual bool IsActive() const = 0;

Expand Down
Loading

0 comments on commit 0672752

Please sign in to comment.