| OLD | NEW | 
|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_COMMON_PEPPER_PLUGIN_REGISTRY_H_ | 5 #ifndef CONTENT_COMMON_PEPPER_PLUGIN_REGISTRY_H_ | 
| 6 #define CONTENT_COMMON_PEPPER_PLUGIN_REGISTRY_H_ | 6 #define CONTENT_COMMON_PEPPER_PLUGIN_REGISTRY_H_ | 
| 7 #pragma once | 7 #pragma once | 
| 8 | 8 | 
| 9 #include <list> | 9 #include <list> | 
| 10 #include <map> | 10 #include <map> | 
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 90   // automatically unregister itself by calling PluginModuleDestroyed(). | 90   // automatically unregister itself by calling PluginModuleDestroyed(). | 
| 91   void AddLiveModule(const FilePath& path, webkit::ppapi::PluginModule* module); | 91   void AddLiveModule(const FilePath& path, webkit::ppapi::PluginModule* module); | 
| 92 | 92 | 
| 93   // ModuleLifetime implementation. | 93   // ModuleLifetime implementation. | 
| 94   virtual void PluginModuleDead(webkit::ppapi::PluginModule* dead_module); | 94   virtual void PluginModuleDead(webkit::ppapi::PluginModule* dead_module); | 
| 95 | 95 | 
| 96  private: | 96  private: | 
| 97   PepperPluginRegistry(); | 97   PepperPluginRegistry(); | 
| 98 | 98 | 
| 99   // Dispatcher::Delegate implementation. | 99   // Dispatcher::Delegate implementation. | 
| 100   virtual MessageLoop* GetIPCMessageLoop(); | 100   virtual base::MessageLoopProxy* GetIPCMessageLoop(); | 
| 101   virtual base::WaitableEvent* GetShutdownEvent(); | 101   virtual base::WaitableEvent* GetShutdownEvent(); | 
| 102   virtual std::set<PP_Instance>* GetGloballySeenInstanceIDSet(); | 102   virtual std::set<PP_Instance>* GetGloballySeenInstanceIDSet(); | 
| 103 | 103 | 
| 104   // All known pepper plugins. | 104   // All known pepper plugins. | 
| 105   std::vector<PepperPluginInfo> plugin_list_; | 105   std::vector<PepperPluginInfo> plugin_list_; | 
| 106 | 106 | 
| 107   // Plugins that have been preloaded so they can be executed in-process in | 107   // Plugins that have been preloaded so they can be executed in-process in | 
| 108   // the renderer (the sandbox prevents on-demand loading). | 108   // the renderer (the sandbox prevents on-demand loading). | 
| 109   typedef std::map<FilePath, scoped_refptr<webkit::ppapi::PluginModule> > | 109   typedef std::map<FilePath, scoped_refptr<webkit::ppapi::PluginModule> > | 
| 110       OwningModuleMap; | 110       OwningModuleMap; | 
| 111   OwningModuleMap preloaded_modules_; | 111   OwningModuleMap preloaded_modules_; | 
| 112 | 112 | 
| 113   // A list of non-owning pointers to all currently-live plugin modules. This | 113   // A list of non-owning pointers to all currently-live plugin modules. This | 
| 114   // includes both preloaded ones in preloaded_modules_, and out-of-process | 114   // includes both preloaded ones in preloaded_modules_, and out-of-process | 
| 115   // modules whose lifetime is managed externally. This will contain only | 115   // modules whose lifetime is managed externally. This will contain only | 
| 116   // non-crashed modules. If an out-of-process module crashes, it may | 116   // non-crashed modules. If an out-of-process module crashes, it may | 
| 117   // continue as long as there are WebKit references to it, but it will not | 117   // continue as long as there are WebKit references to it, but it will not | 
| 118   // appear in this list. | 118   // appear in this list. | 
| 119   typedef std::map<FilePath, webkit::ppapi::PluginModule*> NonOwningModuleMap; | 119   typedef std::map<FilePath, webkit::ppapi::PluginModule*> NonOwningModuleMap; | 
| 120   NonOwningModuleMap live_modules_; | 120   NonOwningModuleMap live_modules_; | 
| 121 | 121 | 
| 122   DISALLOW_COPY_AND_ASSIGN(PepperPluginRegistry); | 122   DISALLOW_COPY_AND_ASSIGN(PepperPluginRegistry); | 
| 123 }; | 123 }; | 
| 124 | 124 | 
| 125 #endif  // CONTENT_COMMON_PEPPER_PLUGIN_REGISTRY_H_ | 125 #endif  // CONTENT_COMMON_PEPPER_PLUGIN_REGISTRY_H_ | 
| OLD | NEW | 
|---|