summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorziadh@chromium.org <ziadh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-27 20:13:23 +0000
committerziadh@chromium.org <ziadh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-27 20:13:23 +0000
commitc12ecab6d48f359d79312aaae5f535b0f26f8445 (patch)
treef24c364ea1906bb414d10888ff920feeaa024679 /views
parent28a5e7b166ea0eafa36d7626ad6767a365a7a332 (diff)
downloadchromium_src-c12ecab6d48f359d79312aaae5f535b0f26f8445.zip
chromium_src-c12ecab6d48f359d79312aaae5f535b0f26f8445.tar.gz
chromium_src-c12ecab6d48f359d79312aaae5f535b0f26f8445.tar.bz2
Add undeclared virtual destructors part 2
Preventative maintainance for abstract classes that do not declare virtual destructors. Base classes that do not declare their destructors as virtual could potentially lead to memory leaks. r=jar BUG=47469 Review URL: http://codereview.chromium.org/3032024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53831 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/controls/button/button.h3
-rw-r--r--views/controls/button/native_button_wrapper.h3
-rw-r--r--views/controls/combobox/native_combobox_wrapper.h3
-rw-r--r--views/controls/link.h3
-rw-r--r--views/controls/listbox/native_listbox_wrapper.h3
-rw-r--r--views/controls/menu/view_menu_delegate.h3
-rw-r--r--views/controls/table/native_table_wrapper.h3
-rw-r--r--views/views_delegate.h2
8 files changed, 23 insertions, 0 deletions
diff --git a/views/controls/button/button.h b/views/controls/button/button.h
index 2319990..dfd239c 100644
--- a/views/controls/button/button.h
+++ b/views/controls/button/button.h
@@ -18,6 +18,9 @@ class Event;
class ButtonListener {
public:
virtual void ButtonPressed(Button* sender, const views::Event& event) = 0;
+
+ protected:
+ virtual ~ButtonListener() {}
};
// A View representing a button. Depending on the specific type, the button
diff --git a/views/controls/button/native_button_wrapper.h b/views/controls/button/native_button_wrapper.h
index ac93acc..e8cbd99 100644
--- a/views/controls/button/native_button_wrapper.h
+++ b/views/controls/button/native_button_wrapper.h
@@ -67,6 +67,9 @@ class NativeButtonWrapper {
static NativeButtonWrapper* CreateCheckboxWrapper(Checkbox* checkbox);
static NativeButtonWrapper* CreateRadioButtonWrapper(
RadioButton* radio_button);
+
+ protected:
+ virtual ~NativeButtonWrapper() {}
};
} // namespace views
diff --git a/views/controls/combobox/native_combobox_wrapper.h b/views/controls/combobox/native_combobox_wrapper.h
index 0313857..61a3075 100644
--- a/views/controls/combobox/native_combobox_wrapper.h
+++ b/views/controls/combobox/native_combobox_wrapper.h
@@ -47,6 +47,9 @@ class NativeComboboxWrapper {
virtual gfx::NativeView GetTestingHandle() const = 0;
static NativeComboboxWrapper* CreateWrapper(Combobox* combobox);
+
+ protected:
+ virtual ~NativeComboboxWrapper() {}
};
} // namespace views
diff --git a/views/controls/link.h b/views/controls/link.h
index ecf415b..fd6b39f 100644
--- a/views/controls/link.h
+++ b/views/controls/link.h
@@ -23,6 +23,9 @@ class Link;
class LinkController {
public:
virtual void LinkActivated(Link* source, int event_flags) = 0;
+
+ protected:
+ virtual ~LinkController() {}
};
////////////////////////////////////////////////////////////////////////////////
diff --git a/views/controls/listbox/native_listbox_wrapper.h b/views/controls/listbox/native_listbox_wrapper.h
index b1f3a65..19bd6ab 100644
--- a/views/controls/listbox/native_listbox_wrapper.h
+++ b/views/controls/listbox/native_listbox_wrapper.h
@@ -33,6 +33,9 @@ class NativeListboxWrapper {
Listbox* listbox,
const std::vector<string16>& strings,
Listbox::Listener* listener);
+
+ protected:
+ virtual ~NativeListboxWrapper() {}
};
} // namespace views
diff --git a/views/controls/menu/view_menu_delegate.h b/views/controls/menu/view_menu_delegate.h
index 3b9a8fe1..b3e4079 100644
--- a/views/controls/menu/view_menu_delegate.h
+++ b/views/controls/menu/view_menu_delegate.h
@@ -30,6 +30,9 @@ class ViewMenuDelegate {
// Create and show a menu at the specified position. Source is the view the
// ViewMenuDelegate was set on.
virtual void RunMenu(View* source, const gfx::Point& pt) = 0;
+
+ protected:
+ virtual ~ViewMenuDelegate() {}
};
} // namespace views
diff --git a/views/controls/table/native_table_wrapper.h b/views/controls/table/native_table_wrapper.h
index 4fe1181..a100572 100644
--- a/views/controls/table/native_table_wrapper.h
+++ b/views/controls/table/native_table_wrapper.h
@@ -70,6 +70,9 @@ class NativeTableWrapper {
// Creates an appropriate NativeButtonWrapper for the platform.
static NativeTableWrapper* CreateNativeWrapper(TableView2* table);
+
+ protected:
+ virtual ~NativeTableWrapper() {}
};
} // namespace views
diff --git a/views/views_delegate.h b/views/views_delegate.h
index 77edac2..e817bbf 100644
--- a/views/views_delegate.h
+++ b/views/views_delegate.h
@@ -26,6 +26,8 @@ namespace views {
// implementation.
class ViewsDelegate {
public:
+ virtual ~ViewsDelegate() {}
+
// Gets the clipboard.
virtual Clipboard* GetClipboard() const = 0;