| OLD | NEW |
| 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/threading/non_thread_safe.h" | 9 #include "base/threading/non_thread_safe.h" |
| 10 #include "content/public/renderer/render_process_observer.h" | 10 #include "content/public/renderer/render_process_observer.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 virtual ~BrowserPluginManager(); | 36 virtual ~BrowserPluginManager(); |
| 37 | 37 |
| 38 // Creates a new BrowserPlugin object with a unique identifier. | 38 // Creates a new BrowserPlugin object with a unique identifier. |
| 39 // BrowserPlugin is responsible for associating itself with the | 39 // BrowserPlugin is responsible for associating itself with the |
| 40 // BrowserPluginManager via AddBrowserPlugin. When it is destroyed, it is | 40 // BrowserPluginManager via AddBrowserPlugin. When it is destroyed, it is |
| 41 // responsible for removing its association via RemoveBrowserPlugin. | 41 // responsible for removing its association via RemoveBrowserPlugin. |
| 42 virtual BrowserPlugin* CreateBrowserPlugin( | 42 virtual BrowserPlugin* CreateBrowserPlugin( |
| 43 RenderViewImpl* render_view, | 43 RenderViewImpl* render_view, |
| 44 WebKit::WebFrame* frame, | 44 WebKit::WebFrame* frame, |
| 45 const WebKit::WebPluginParams& params) = 0; | 45 const WebKit::WebPluginParams& params) = 0; |
| 46 virtual void SignalTextureProviderIsReady(int instance_id) = 0; |
| 46 | 47 |
| 47 void AddBrowserPlugin(int instance_id, BrowserPlugin* browser_plugin); | 48 void AddBrowserPlugin(int instance_id, BrowserPlugin* browser_plugin); |
| 48 void RemoveBrowserPlugin(int instance_id); | 49 void RemoveBrowserPlugin(int instance_id); |
| 49 BrowserPlugin* GetBrowserPlugin(int instance_id) const; | 50 BrowserPlugin* GetBrowserPlugin(int instance_id) const; |
| 50 | 51 |
| 51 protected: | 52 protected: |
| 52 IDMap<BrowserPlugin> instances_; | 53 IDMap<BrowserPlugin> instances_; |
| 53 int browser_plugin_counter_; | 54 int browser_plugin_counter_; |
| 55 |
| 54 }; | 56 }; |
| 55 | 57 |
| 56 } // namespace content | 58 } // namespace content |
| 57 | 59 |
| 58 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_MANAGER_H_ | 60 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_MANAGER_H_ |
| OLD | NEW |