| 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/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 // responsible for removing its association via RemoveBrowserPlugin. | 46 // responsible for removing its association via RemoveBrowserPlugin. |
| 47 virtual BrowserPlugin* CreateBrowserPlugin( | 47 virtual BrowserPlugin* CreateBrowserPlugin( |
| 48 RenderViewImpl* render_view, | 48 RenderViewImpl* render_view, |
| 49 blink::WebFrame* frame, | 49 blink::WebFrame* frame, |
| 50 bool auto_navigate) = 0; | 50 bool auto_navigate) = 0; |
| 51 | 51 |
| 52 // Asynchronously requests a new browser-process-allocated instance ID. | 52 // Asynchronously requests a new browser-process-allocated instance ID. |
| 53 // After the browser process allocates an ID, it calls back into the | 53 // After the browser process allocates an ID, it calls back into the |
| 54 // |browser_plugin| if it's still alive. | 54 // |browser_plugin| if it's still alive. |
| 55 virtual void AllocateInstanceID( | 55 virtual void AllocateInstanceID( |
| 56 const base::WeakPtr<BrowserPlugin>& browser_plugin) = 0; | 56 const base::WeakPtr<BrowserPlugin>& browser_plugin, |
| 57 const std::string& src) = 0; |
| 57 | 58 |
| 58 void AddBrowserPlugin(int guest_instance_id, BrowserPlugin* browser_plugin); | 59 void AddBrowserPlugin(int guest_instance_id, BrowserPlugin* browser_plugin); |
| 59 void RemoveBrowserPlugin(int guest_instance_id); | 60 void RemoveBrowserPlugin(int guest_instance_id); |
| 60 BrowserPlugin* GetBrowserPlugin(int guest_instance_id) const; | 61 BrowserPlugin* GetBrowserPlugin(int guest_instance_id) const; |
| 61 void UpdateDeviceScaleFactor(float device_scale_factor); | 62 void UpdateDeviceScaleFactor(float device_scale_factor); |
| 62 void UpdateFocusState(); | 63 void UpdateFocusState(); |
| 63 RenderViewImpl* render_view() const { return render_view_.get(); } | 64 RenderViewImpl* render_view() const { return render_view_.get(); } |
| 64 | 65 |
| 65 // RenderViewObserver implementation. | 66 // RenderViewObserver implementation. |
| 66 | 67 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 84 // This map is keyed by guest instance IDs. | 85 // This map is keyed by guest instance IDs. |
| 85 IDMap<BrowserPlugin> instances_; | 86 IDMap<BrowserPlugin> instances_; |
| 86 base::WeakPtr<RenderViewImpl> render_view_; | 87 base::WeakPtr<RenderViewImpl> render_view_; |
| 87 | 88 |
| 88 DISALLOW_COPY_AND_ASSIGN(BrowserPluginManager); | 89 DISALLOW_COPY_AND_ASSIGN(BrowserPluginManager); |
| 89 }; | 90 }; |
| 90 | 91 |
| 91 } // namespace content | 92 } // namespace content |
| 92 | 93 |
| 93 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_MANAGER_H_ | 94 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_MANAGER_H_ |
| OLD | NEW |