Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Unified Diff: content/renderer/browser_plugin/browser_plugin_registry.h

Issue 9609008: Implemented Browser Plugin (NOT FOR REVIEW) (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Updated according to creis@'s comments Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..09ffdfa3ec3419d7a0b87c3858fe83911fceab32
--- /dev/null
+++ b/content/renderer/browser_plugin/browser_plugin_registry.h
@@ -0,0 +1,36 @@
+// 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 "base/id_map.h"
+#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 process.
+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:
+ IDMap<webkit::ppapi::PluginModule> modules_;
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_REGISTRY_H_

Powered by Google App Engine
This is Rietveld 408576698