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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 base::MessageLoopProxy* 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 virtual pp::shared_impl::WebKitForwarding* GetWebKitForwarding(); |
| 104 virtual void PostToWebKitThread(const tracked_objects::Location& from_here, |
| 105 const base::Closure& task); |
103 | 106 |
104 // All known pepper plugins. | 107 // All known pepper plugins. |
105 std::vector<PepperPluginInfo> plugin_list_; | 108 std::vector<PepperPluginInfo> plugin_list_; |
106 | 109 |
107 // Plugins that have been preloaded so they can be executed in-process in | 110 // Plugins that have been preloaded so they can be executed in-process in |
108 // the renderer (the sandbox prevents on-demand loading). | 111 // the renderer (the sandbox prevents on-demand loading). |
109 typedef std::map<FilePath, scoped_refptr<webkit::ppapi::PluginModule> > | 112 typedef std::map<FilePath, scoped_refptr<webkit::ppapi::PluginModule> > |
110 OwningModuleMap; | 113 OwningModuleMap; |
111 OwningModuleMap preloaded_modules_; | 114 OwningModuleMap preloaded_modules_; |
112 | 115 |
113 // A list of non-owning pointers to all currently-live plugin modules. This | 116 // 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 | 117 // includes both preloaded ones in preloaded_modules_, and out-of-process |
115 // modules whose lifetime is managed externally. This will contain only | 118 // modules whose lifetime is managed externally. This will contain only |
116 // non-crashed modules. If an out-of-process module crashes, it may | 119 // 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 | 120 // continue as long as there are WebKit references to it, but it will not |
118 // appear in this list. | 121 // appear in this list. |
119 typedef std::map<FilePath, webkit::ppapi::PluginModule*> NonOwningModuleMap; | 122 typedef std::map<FilePath, webkit::ppapi::PluginModule*> NonOwningModuleMap; |
120 NonOwningModuleMap live_modules_; | 123 NonOwningModuleMap live_modules_; |
121 | 124 |
122 DISALLOW_COPY_AND_ASSIGN(PepperPluginRegistry); | 125 DISALLOW_COPY_AND_ASSIGN(PepperPluginRegistry); |
123 }; | 126 }; |
124 | 127 |
125 #endif // CONTENT_COMMON_PEPPER_PLUGIN_REGISTRY_H_ | 128 #endif // CONTENT_COMMON_PEPPER_PLUGIN_REGISTRY_H_ |
OLD | NEW |