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

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

Issue 1162053003: Move BrowserPluginDelegate's lifetime mgmt out of content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync @tott Created 5 years, 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_MANAGER_H_ 5 #ifndef CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_MANAGER_H_
6 #define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_MANAGER_H_ 6 #define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_MANAGER_H_
7 7
8 #include "base/id_map.h" 8 #include "base/id_map.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "content/public/renderer/render_process_observer.h" 10 #include "content/public/renderer/render_process_observer.h"
(...skipping 16 matching lines...) Expand all
27 public: 27 public:
28 static BrowserPluginManager* Get(); 28 static BrowserPluginManager* Get();
29 29
30 BrowserPluginManager(); 30 BrowserPluginManager();
31 ~BrowserPluginManager() override; 31 ~BrowserPluginManager() override;
32 32
33 // Creates a new BrowserPlugin object. 33 // Creates a new BrowserPlugin object.
34 // BrowserPlugin is responsible for associating itself with the 34 // BrowserPlugin is responsible for associating itself with the
35 // BrowserPluginManager via AddBrowserPlugin. When it is destroyed, it is 35 // BrowserPluginManager via AddBrowserPlugin. When it is destroyed, it is
36 // responsible for removing its association via RemoveBrowserPlugin. 36 // responsible for removing its association via RemoveBrowserPlugin.
37 BrowserPlugin* CreateBrowserPlugin( 37 // The |delegate| is expected to manage its own lifetime.
38 RenderFrame* render_frame, 38 // Generally BrowserPlugin calls DidDestroyElement() on the delegate and
39 scoped_ptr<BrowserPluginDelegate> delegate); 39 // right now the delegate destroys itself once it hears that callback.
40 BrowserPlugin* CreateBrowserPlugin(RenderFrame* render_frame,
41 BrowserPluginDelegate* delegate);
40 42
41 void Attach(int browser_plugin_instance_id); 43 void Attach(int browser_plugin_instance_id);
42 44
43 void Detach(int browser_plugin_instance_id); 45 void Detach(int browser_plugin_instance_id);
44 46
45 void AddBrowserPlugin(int browser_plugin_instance_id, 47 void AddBrowserPlugin(int browser_plugin_instance_id,
46 BrowserPlugin* browser_plugin); 48 BrowserPlugin* browser_plugin);
47 void RemoveBrowserPlugin(int browser_plugin_instance_id); 49 void RemoveBrowserPlugin(int browser_plugin_instance_id);
48 BrowserPlugin* GetBrowserPlugin(int browser_plugin_instance_id) const; 50 BrowserPlugin* GetBrowserPlugin(int browser_plugin_instance_id) const;
49 51
(...skipping 15 matching lines...) Expand all
65 67
66 // This map is keyed by guest instance IDs. 68 // This map is keyed by guest instance IDs.
67 IDMap<BrowserPlugin> instances_; 69 IDMap<BrowserPlugin> instances_;
68 70
69 DISALLOW_COPY_AND_ASSIGN(BrowserPluginManager); 71 DISALLOW_COPY_AND_ASSIGN(BrowserPluginManager);
70 }; 72 };
71 73
72 } // namespace content 74 } // namespace content
73 75
74 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_MANAGER_H_ 76 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_MANAGER_H_
OLDNEW
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin.cc ('k') | content/renderer/browser_plugin/browser_plugin_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698