diff options
21 files changed, 63 insertions, 8 deletions
diff --git a/app/active_window_watcher_x.h b/app/active_window_watcher_x.h index 642b63d..e2612ec 100644 --- a/app/active_window_watcher_x.h +++ b/app/active_window_watcher_x.h @@ -21,6 +21,9 @@ class ActiveWindowWatcherX { public: // |active_window| will be NULL if the active window isn't one of Chrome's. virtual void ActiveWindowChanged(GdkWindow* active_window) = 0; + + protected: + virtual ~Observer() {} }; static void AddObserver(Observer* observer); diff --git a/app/menus/button_menu_item_model.h b/app/menus/button_menu_item_model.h index 8e3300e..38f8cf9 100644 --- a/app/menus/button_menu_item_model.h +++ b/app/menus/button_menu_item_model.h @@ -32,6 +32,9 @@ class ButtonMenuItemModel { // Performs the action associated with the specified command id. virtual void ExecuteCommand(int command_id) = 0; virtual bool IsCommandIdEnabled(int command_id) const { return true; } + + protected: + virtual ~Delegate() {} }; ButtonMenuItemModel(int string_id, ButtonMenuItemModel::Delegate* delegate); diff --git a/chrome/common/deprecated/event_sys.h b/chrome/common/deprecated/event_sys.h index be4264a..6e34eb7 100644 --- a/chrome/common/deprecated/event_sys.h +++ b/chrome/common/deprecated/event_sys.h @@ -20,6 +20,9 @@ template <typename EventType> class EventListener { public: virtual void HandleEvent(const EventType& event) = 0; + + protected: + virtual ~EventListener() {} }; // See the -inl.h for details about the following. diff --git a/chrome/common/mach_message_source_mac.h b/chrome/common/mach_message_source_mac.h index ceced0a..5ad8329 100644 --- a/chrome/common/mach_message_source_mac.h +++ b/chrome/common/mach_message_source_mac.h @@ -39,6 +39,9 @@ class MachMessageSource { class MachPortListener { public: virtual void OnMachMessageReceived(void* mach_msg, size_t size) = 0; + + protected: + virtual ~OnMachMessageReceived() {} }; // |listener| is a week reference passed to CF, it needs to remain in diff --git a/chrome/common/sandbox_mac_unittest_helper.h b/chrome/common/sandbox_mac_unittest_helper.h index adf6401..3edb7c4 100644 --- a/chrome/common/sandbox_mac_unittest_helper.h +++ b/chrome/common/sandbox_mac_unittest_helper.h @@ -70,6 +70,8 @@ class MacSandboxTest : public MultiProcessTest { // REGISTER_SANDBOX_TEST_CASE so it's visible to the test driver. class MacSandboxTestCase { public: + virtual ~MacSandboxTestCase() {} + // Code that runs in the sandboxed subprocess before the sandbox is // initialized. // Returning false from this function will cause the entire test case to fail. diff --git a/chrome/installer/util/html_dialog.h b/chrome/installer/util/html_dialog.h index 325d978..80edbba 100644 --- a/chrome/installer/util/html_dialog.h +++ b/chrome/installer/util/html_dialog.h @@ -39,8 +39,13 @@ class HTMLDialog { // The native window has been created and is about to be visible. Use it // to customize the native |window| appearance. virtual void OnBeforeDisplay(void* window) = 0; + + protected: + virtual ~CustomizationCallback() {} }; + virtual ~HTMLDialog() {} + // Shows the HTML in a modal dialog. The buttons and other UI are also done // in HTML so each native implementation needs to map the user action into // one of the 6 possible results of DialogResult. Important, call this @@ -51,7 +56,6 @@ class HTMLDialog { // If the result of ShowModal() was EXTRA, the information is available // as a string using this method. virtual std::wstring GetExtraResult() = 0; - }; // Factory method for the native HTML Dialog. When done with the object use diff --git a/chrome/renderer/pepper_widget.h b/chrome/renderer/pepper_widget.h index 67d8037..7e0654e 100644 --- a/chrome/renderer/pepper_widget.h +++ b/chrome/renderer/pepper_widget.h @@ -27,7 +27,7 @@ class PepperWidget { virtual void SetProperty(NPWidgetProperty property, void* value) = 0; protected: - ~PepperWidget(); + virtual ~PepperWidget(); // Tells the plugin that a property changed. void WidgetPropertyChanged(NPWidgetProperty property); diff --git a/chrome/renderer/render_view_visitor.h b/chrome/renderer/render_view_visitor.h index 4910b48..5cfb36b 100644 --- a/chrome/renderer/render_view_visitor.h +++ b/chrome/renderer/render_view_visitor.h @@ -12,7 +12,7 @@ class RenderViewVisitor { virtual bool Visit(RenderView* render_view) = 0; protected: - ~RenderViewVisitor() {} + virtual ~RenderViewVisitor() {} }; #endif // CHROME_RENDERER_RENDER_VIEW_VISITOR_H_ diff --git a/chrome/service/cloud_print/job_status_updater.h b/chrome/service/cloud_print/job_status_updater.h index fea4979..993d825 100644 --- a/chrome/service/cloud_print/job_status_updater.h +++ b/chrome/service/cloud_print/job_status_updater.h @@ -27,6 +27,9 @@ class JobStatusUpdater : public base::RefCountedThreadSafe<JobStatusUpdater>, class Delegate { public: virtual bool OnJobCompleted(JobStatusUpdater* updater) = 0; + + protected: + virtual ~Delegate() {} }; JobStatusUpdater(const std::string& printer_name, diff --git a/chrome/test/interactive_ui/view_event_test_base.h b/chrome/test/interactive_ui/view_event_test_base.h index eab30a9..d36fcc5 100644 --- a/chrome/test/interactive_ui/view_event_test_base.h +++ b/chrome/test/interactive_ui/view_event_test_base.h @@ -84,6 +84,8 @@ class ViewEventTestBase : public views::WindowDelegate, static bool ImplementsThreadSafeReferenceCounting() { return false; } protected: + virtual ~ViewEventTestBase() {} + // Returns the view that is added to the window. virtual views::View* CreateContentsView() = 0; diff --git a/chrome_frame/np_event_listener.h b/chrome_frame/np_event_listener.h index 18cb4eb..bb6da66 100644 --- a/chrome_frame/np_event_listener.h +++ b/chrome_frame/np_event_listener.h @@ -33,6 +33,9 @@ class NpEventListener { virtual bool Unsubscribe(NPP instance, const char* event_names[], int event_name_count) = 0; + + protected: + virtual ~NpEventListener() {} }; // A little helper class to implement simple ref counting @@ -40,7 +43,7 @@ class NpEventListener { template <class T> class NpEventListenerBase : public NpEventListener { public: - NpEventListenerBase(NpEventDelegate* delegate) + explicit NpEventListenerBase(NpEventDelegate* delegate) : ref_count_(0), delegate_(delegate) { DCHECK(delegate_); thread_id_ = ::GetCurrentThreadId(); @@ -83,8 +86,8 @@ class DomEventListener : public nsIDOMEventListener, public NpEventListenerBase<DomEventListener> { public: - DomEventListener(NpEventDelegate* delegate); - ~DomEventListener(); + explicit DomEventListener(NpEventDelegate* delegate); + virtual ~DomEventListener(); // Implementation of NpEventListener virtual bool Subscribe(NPP instance, @@ -118,7 +121,7 @@ class DomEventListener class NPObjectEventListener : public NpEventListenerBase<NPObjectEventListener> { public: - NPObjectEventListener(NpEventDelegate* delegate); + explicit NPObjectEventListener(NpEventDelegate* delegate); ~NPObjectEventListener(); // Implementation of NpEventListener @@ -133,7 +136,7 @@ class NPObjectEventListener // NPObject structure which is exposed by NPObjectEventListener. class Npo : public NPObject { public: - Npo(NPP npp) : npp_(npp), listener_(NULL) { + explicit Npo(NPP npp) : npp_(npp), listener_(NULL) { } void Initialize(NPObjectEventListener* listener) { diff --git a/chrome_frame/test/window_watchdog.h b/chrome_frame/test/window_watchdog.h index 700859f..60accda 100644 --- a/chrome_frame/test/window_watchdog.h +++ b/chrome_frame/test/window_watchdog.h @@ -17,6 +17,9 @@ struct FunctionStub; class WindowObserver { // NOLINT public: virtual void OnWindowDetected(HWND hwnd, const std::string& caption) = 0; + + protected: + virtual ~WindowObserver() {} }; // Watch a for window to be shown with the given window class name. diff --git a/printing/printed_pages_source.h b/printing/printed_pages_source.h index 4ae6549..ec130dd 100644 --- a/printing/printed_pages_source.h +++ b/printing/printed_pages_source.h @@ -22,6 +22,9 @@ class PrintedPagesSource { // Returns the URL's source of the document if applicable. virtual GURL RenderSourceUrl() = 0; + + protected: + virtual ~PrintedPagesSource() {} }; } // namespace printing 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; |