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 "base/id_map.h" |
| 10 #include "base/process.h" |
| 11 #include "webkit/plugins/ppapi/plugin_delegate.h" |
| 12 |
| 13 namespace content { |
| 14 |
| 15 // This class holds references to all of the known live browser plugin |
| 16 // modules. There is one browser plugin module per guest renderer process. |
| 17 class BrowserPluginRegistry |
| 18 : public webkit::ppapi::PluginDelegate::ModuleLifetime { |
| 19 public: |
| 20 ~BrowserPluginRegistry() { } |
| 21 |
| 22 webkit::ppapi::PluginModule* GetModule(int guest_process_id); |
| 23 void AddModule(int guest_process_id, |
| 24 webkit::ppapi::PluginModule* module); |
| 25 |
| 26 // ModuleLifetime implementation. |
| 27 virtual void PluginModuleDead( |
| 28 webkit::ppapi::PluginModule* dead_module) OVERRIDE; |
| 29 |
| 30 private: |
| 31 IDMap<webkit::ppapi::PluginModule> modules_; |
| 32 }; |
| 33 |
| 34 } // namespace content |
| 35 |
| 36 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_REGISTRY_H_ |
OLD | NEW |