Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2012 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 CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_REGISTRY_H_ | |
| 6 #define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_REGISTRY_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include <map> | |
| 10 | |
| 11 #include "base/process.h" | |
| 12 #include "webkit/plugins/ppapi/plugin_delegate.h" | |
| 13 | |
| 14 namespace content { | |
| 15 | |
| 16 // This class holds references to all of the known live browser plugin | |
| 17 // modules. There is one browser plugin module per guest renderer. | |
| 18 // This is roughly based on the SiteInstance. There is one browser plugin | |
| 19 // module per SiteInstance of a given BrowsingInstance. | |
|
jam
2012/05/16 02:22:40
it seems unfortunate to mention SiteInstance in th
Fady Samuel
2012/05/16 04:43:54
Removed that reference.
| |
| 20 class BrowserPluginRegistry | |
| 21 : public webkit::ppapi::PluginDelegate::ModuleLifetime { | |
| 22 public: | |
| 23 ~BrowserPluginRegistry() { } | |
| 24 | |
| 25 webkit::ppapi::PluginModule* GetModule(int guest_process_id); | |
| 26 void AddModule(int guest_process_id, | |
| 27 webkit::ppapi::PluginModule* module); | |
| 28 | |
| 29 // ModuleLifetime implementation. | |
| 30 virtual void PluginModuleDead( | |
| 31 webkit::ppapi::PluginModule* dead_module) OVERRIDE; | |
| 32 | |
| 33 private: | |
| 34 // TODO(fsamuel): Make this an IDMap. | |
|
jam
2012/05/16 02:22:40
nit: do this now...
Fady Samuel
2012/05/16 04:43:54
Done.
| |
| 35 typedef std::map<int, | |
| 36 webkit::ppapi::PluginModule*> NonOwningModuleMap; | |
| 37 NonOwningModuleMap modules_; | |
| 38 }; | |
| 39 | |
| 40 } // namespace content | |
| 41 | |
| 42 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_REGISTRY_H_ | |
| OLD | NEW |