Chromium Code Reviews| Index: content/renderer/browser_plugin/browser_plugin_registry.h |
| diff --git a/content/renderer/browser_plugin/browser_plugin_registry.h b/content/renderer/browser_plugin/browser_plugin_registry.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b6ec1338e6cf8f68396aa04a4a3990593059ee25 |
| --- /dev/null |
| +++ b/content/renderer/browser_plugin/browser_plugin_registry.h |
| @@ -0,0 +1,42 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_REGISTRY_H_ |
| +#define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_REGISTRY_H_ |
| +#pragma once |
| + |
| +#include <map> |
| + |
| +#include "base/process.h" |
| +#include "webkit/plugins/ppapi/plugin_delegate.h" |
| + |
| +namespace content { |
| + |
| +// This class holds references to all of the known live browser plugin |
| +// modules. There is one browser plugin module per guest renderer. |
| +// This is roughly based on the SiteInstance. There is one browser plugin |
| +// 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.
|
| +class BrowserPluginRegistry |
| + : public webkit::ppapi::PluginDelegate::ModuleLifetime { |
| + public: |
| + ~BrowserPluginRegistry() { } |
| + |
| + webkit::ppapi::PluginModule* GetModule(int guest_process_id); |
| + void AddModule(int guest_process_id, |
| + webkit::ppapi::PluginModule* module); |
| + |
| + // ModuleLifetime implementation. |
| + virtual void PluginModuleDead( |
| + webkit::ppapi::PluginModule* dead_module) OVERRIDE; |
| + |
| + private: |
| + // 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.
|
| + typedef std::map<int, |
| + webkit::ppapi::PluginModule*> NonOwningModuleMap; |
| + NonOwningModuleMap modules_; |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_REGISTRY_H_ |