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

Side by Side Diff: content/renderer/browser_plugin/browser_plugin_manager.h

Issue 10830072: Browser Plugin: New Implementation (Renderer Side) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed leaky Persistents in BrowserPlugin Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_MANAGER_H_
6 #define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_MANAGER_H_
7
8 #include "base/id_map.h"
9 #include "content/public/renderer/render_process_observer.h"
10 #include "ipc/ipc_sender.h"
11
12 class RenderViewImpl;
13
14 namespace WebKit {
15 class WebFrame;
16 struct WebPluginParams;
17 }
18
19 namespace content {
20 namespace browser_plugin {
21
22 class BrowserPlugin;
23
24 // BrowserPluginManager manages the routing of messages to the appropriate
25 // BrowserPlugin object based on its instance ID. There is only one
26 // BrowserPluginManager per renderer process, and it should only be accessed
27 // by the render thread.
Charlie Reis 2012/08/01 23:20:51 Can we enforce this, using something like ThreadCh
Fady Samuel 2012/08/02 18:32:47 Done.
28 class CONTENT_EXPORT BrowserPluginManager : public IPC::Sender,
29 public RenderProcessObserver {
30 public:
31 // Returns the one BrowserPluginManager for this process.
32 static BrowserPluginManager* Get();
33
34 BrowserPluginManager();
35 virtual ~BrowserPluginManager();
36
37 virtual BrowserPlugin* CreateBrowserPlugin(
Charlie Reis 2012/08/01 23:20:51 It's not clear from here that the created BrowserP
Fady Samuel 2012/08/02 18:32:47 Done.
38 RenderViewImpl* render_view,
39 WebKit::WebFrame* frame,
40 const WebKit::WebPluginParams& params) = 0;
41
42 void AddBrowserPlugin(int instance_id, BrowserPlugin* browser_plugin);
43 void RemoveBrowserPlugin(int instance_id);
44 BrowserPlugin* GetBrowserPlugin(int instance_id) const;
45
46 protected:
47 IDMap<BrowserPlugin> instances_;
48 int browser_plugin_counter_;
49 };
50
51 } // namespace browser_plugin
52 } // namespace content
53
54 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698