Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Unified Diff: chrome_frame/np_event_listener.h

Issue 3032024: Add undeclared virtual destructors part 2... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/interactive_ui/view_event_test_base.h ('k') | chrome_frame/test/window_watchdog.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/np_event_listener.h
===================================================================
--- chrome_frame/np_event_listener.h (revision 53376)
+++ chrome_frame/np_event_listener.h (working copy)
@@ -33,6 +33,9 @@
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 @@
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 @@
: 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 NPObjectEventListener
: public NpEventListenerBase<NPObjectEventListener> {
public:
- NPObjectEventListener(NpEventDelegate* delegate);
+ explicit NPObjectEventListener(NpEventDelegate* delegate);
~NPObjectEventListener();
// Implementation of NpEventListener
@@ -133,7 +136,7 @@
// 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) {
« no previous file with comments | « chrome/test/interactive_ui/view_event_test_base.h ('k') | chrome_frame/test/window_watchdog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698