| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef GPU_NP_UTILS_NP_PLUGIN_OBJECT_H_ | |
| 6 #define GPU_NP_UTILS_NP_PLUGIN_OBJECT_H_ | |
| 7 | |
| 8 #include "gpu/np_utils/np_object_pointer.h" | |
| 9 #include "gpu/np_utils/np_headers.h" | |
| 10 | |
| 11 namespace np_utils { | |
| 12 | |
| 13 // Interface for a plugin instance. The NPP plugin calls forwards to an instance | |
| 14 // of this interface. | |
| 15 class PluginObject { | |
| 16 public: | |
| 17 // Initialize this object. | |
| 18 virtual NPError New(NPMIMEType plugin_type, | |
| 19 int16 argc, | |
| 20 char* argn[], | |
| 21 char* argv[], | |
| 22 NPSavedData* saved) = 0; | |
| 23 | |
| 24 virtual NPError SetWindow(NPWindow* new_window) = 0; | |
| 25 | |
| 26 virtual int16 HandleEvent(NPEvent* event) = 0; | |
| 27 | |
| 28 // Uninitialize but do not deallocate the object. Release will be called to | |
| 29 // deallocate if Destroy succeeds. | |
| 30 virtual NPError Destroy(NPSavedData** saved) = 0; | |
| 31 | |
| 32 // Deallocate this object. This object is invalid after this returns. | |
| 33 virtual void Release() = 0; | |
| 34 | |
| 35 virtual NPObject* GetScriptableNPObject() = 0; | |
| 36 | |
| 37 protected: | |
| 38 PluginObject() { | |
| 39 } | |
| 40 | |
| 41 virtual ~PluginObject() { | |
| 42 } | |
| 43 | |
| 44 private: | |
| 45 DISALLOW_COPY_AND_ASSIGN(PluginObject); | |
| 46 }; | |
| 47 | |
| 48 } // namespace np_utils | |
| 49 | |
| 50 #endif // GPU_NP_UTILS_NP_PLUGIN_OBJECT_H_ | |
| OLD | NEW |