| 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_FACTORY_H_ | |
| 6 #define GPU_NP_UTILS_NP_PLUGIN_OBJECT_FACTORY_H_ | |
| 7 | |
| 8 #include "base/basictypes.h" | |
| 9 #include "gpu/np_utils/np_headers.h" | |
| 10 | |
| 11 namespace np_utils { | |
| 12 | |
| 13 class PluginObject; | |
| 14 | |
| 15 // Mockable factory base class used to create instances of PluginObject based on | |
| 16 // plugin mime type. | |
| 17 class NPPluginObjectFactory { | |
| 18 public: | |
| 19 virtual PluginObject* CreatePluginObject(NPP npp, NPMIMEType plugin_type); | |
| 20 | |
| 21 static NPPluginObjectFactory* get() { | |
| 22 return factory_; | |
| 23 } | |
| 24 | |
| 25 protected: | |
| 26 NPPluginObjectFactory(); | |
| 27 virtual ~NPPluginObjectFactory(); | |
| 28 | |
| 29 private: | |
| 30 static NPPluginObjectFactory* factory_; | |
| 31 NPPluginObjectFactory* previous_factory_; | |
| 32 DISALLOW_COPY_AND_ASSIGN(NPPluginObjectFactory); | |
| 33 }; | |
| 34 | |
| 35 } // namespace np_utils | |
| 36 | |
| 37 #endif // GPU_NP_UTILS_NP_PLUGIN_OBJECT_FACTORY_H_ | |
| OLD | NEW |