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

Side by Side Diff: webkit/plugins/npapi/test/plugin_npobject_lifetime_test.h

Issue 7064033: Virtual destructors should have virtual keyword. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_NPOBJECT_LIFETIME_TEST_H_ 5 #ifndef WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_NPOBJECT_LIFETIME_TEST_H_
6 #define WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_NPOBJECT_LIFETIME_TEST_H_ 6 #define WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_NPOBJECT_LIFETIME_TEST_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "webkit/plugins/npapi/test/plugin_test.h" 9 #include "webkit/plugins/npapi/test/plugin_test.h"
10 10
(...skipping 23 matching lines...) Expand all
34 #endif 34 #endif
35 DISALLOW_IMPLICIT_CONSTRUCTORS(NPObjectLifetimeTest); 35 DISALLOW_IMPLICIT_CONSTRUCTORS(NPObjectLifetimeTest);
36 }; 36 };
37 37
38 // The NPObjectLifetimeTestInstance2 class represents the plugin instance 38 // The NPObjectLifetimeTestInstance2 class represents the plugin instance
39 // which is deleted by the NPObjectLifeTime class via a javascript function. 39 // which is deleted by the NPObjectLifeTime class via a javascript function.
40 class NPObjectLifetimeTestInstance2 : public PluginTest { 40 class NPObjectLifetimeTestInstance2 : public PluginTest {
41 public: 41 public:
42 // Constructor. 42 // Constructor.
43 NPObjectLifetimeTestInstance2(NPP id, NPNetscapeFuncs *host_functions); 43 NPObjectLifetimeTestInstance2(NPP id, NPNetscapeFuncs *host_functions);
44 ~NPObjectLifetimeTestInstance2(); 44 virtual ~NPObjectLifetimeTestInstance2();
45 45
46 // NPAPI SetWindow handler. 46 // NPAPI SetWindow handler.
47 virtual NPError SetWindow(NPWindow* pNPWindow); 47 virtual NPError SetWindow(NPWindow* pNPWindow);
48 protected: 48 protected:
49 static NPObject* plugin_instance_object_; 49 static NPObject* plugin_instance_object_;
50 friend class NPObjectLifetimeTest; 50 friend class NPObjectLifetimeTest;
51 51
52 DISALLOW_IMPLICIT_CONSTRUCTORS(NPObjectLifetimeTestInstance2); 52 DISALLOW_IMPLICIT_CONSTRUCTORS(NPObjectLifetimeTestInstance2);
53 }; 53 };
54 54
55 // The NPObjectLifeTime class tests the case where a plugin instance is 55 // The NPObjectLifeTime class tests the case where a plugin instance is
56 // destroyed in NPN_Evaluate 56 // destroyed in NPN_Evaluate
57 class NPObjectDeletePluginInNPN_Evaluate : public PluginTest { 57 class NPObjectDeletePluginInNPN_Evaluate : public PluginTest {
58 public: 58 public:
59 // Constructor. 59 // Constructor.
60 NPObjectDeletePluginInNPN_Evaluate(NPP id, NPNetscapeFuncs *host_functions); 60 NPObjectDeletePluginInNPN_Evaluate(NPP id, NPNetscapeFuncs *host_functions);
61 ~NPObjectDeletePluginInNPN_Evaluate(); 61 virtual ~NPObjectDeletePluginInNPN_Evaluate();
62 62
63 // NPAPI SetWindow handler. 63 // NPAPI SetWindow handler.
64 virtual NPError SetWindow(NPWindow* pNPWindow); 64 virtual NPError SetWindow(NPWindow* pNPWindow);
65 65
66 protected: 66 protected:
67 NPObject* plugin_instance_object_; 67 NPObject* plugin_instance_object_;
68 #if defined(OS_WIN) 68 #if defined(OS_WIN)
69 static void CALLBACK TimerProc(HWND window, UINT message, UINT timer_id, 69 static void CALLBACK TimerProc(HWND window, UINT message, UINT timer_id,
70 unsigned long elapsed_milli_seconds); 70 unsigned long elapsed_milli_seconds);
71 UINT_PTR timer_id_; 71 UINT_PTR timer_id_;
72 #endif 72 #endif
73 73
74 private: 74 private:
75 static NPObjectDeletePluginInNPN_Evaluate* g_npn_evaluate_test_instance_; 75 static NPObjectDeletePluginInNPN_Evaluate* g_npn_evaluate_test_instance_;
76 76
77 DISALLOW_IMPLICIT_CONSTRUCTORS(NPObjectDeletePluginInNPN_Evaluate); 77 DISALLOW_IMPLICIT_CONSTRUCTORS(NPObjectDeletePluginInNPN_Evaluate);
78 }; 78 };
79 79
80 } // namespace NPAPIClient 80 } // namespace NPAPIClient
81 81
82 #endif // WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_NPOBJECT_LIFETIME_TEST_H_ 82 #endif // WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_NPOBJECT_LIFETIME_TEST_H_
OLDNEW
« no previous file with comments | « webkit/glue/weburlloader_impl.h ('k') | webkit/plugins/npapi/test/plugin_thread_async_call_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698