OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H_ | 5 #ifndef CHROME_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H_ |
6 #define CHROME_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H_ | 6 #define CHROME_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "app/surface/transport_dib.h" | 12 #include "app/surface/transport_dib.h" |
13 #include "base/ref_counted.h" | 13 #include "base/ref_counted.h" |
14 #include "base/scoped_ptr.h" | 14 #include "base/scoped_ptr.h" |
15 #include "base/weak_ptr.h" | 15 #include "base/weak_ptr.h" |
16 #include "googleurl/src/gurl.h" | 16 #include "googleurl/src/gurl.h" |
17 #include "ipc/ipc_channel.h" | 17 #include "ipc/ipc_channel.h" |
18 #include "ipc/ipc_message.h" | 18 #include "ipc/ipc_message.h" |
19 #include "ui/gfx/native_widget_types.h" | 19 #include "ui/gfx/native_widget_types.h" |
20 #include "ui/gfx/rect.h" | 20 #include "ui/gfx/rect.h" |
21 #include "webkit/plugins/npapi/webplugininfo.h" | 21 #include "webkit/plugins/npapi/webplugininfo.h" |
22 #include "webkit/plugins/npapi/webplugin_delegate.h" | 22 #include "webkit/plugins/npapi/webplugin_delegate.h" |
23 | 23 |
24 #if defined(OS_MACOSX) | 24 #if defined(OS_MACOSX) |
25 #include "base/hash_tables.h" | 25 #include "base/hash_tables.h" |
26 #include "base/linked_ptr.h" | 26 #include "base/linked_ptr.h" |
27 #endif | 27 #endif |
28 | 28 |
| 29 class CommandBufferProxy; |
29 struct NPObject; | 30 struct NPObject; |
30 class NPObjectStub; | 31 class NPObjectStub; |
31 struct NPVariant_Param; | 32 struct NPVariant_Param; |
32 class PluginChannelHost; | 33 class PluginChannelHost; |
33 struct PluginHostMsg_URLRequest_Params; | 34 struct PluginHostMsg_URLRequest_Params; |
34 class RenderView; | 35 class RenderView; |
35 class SkBitmap; | 36 class SkBitmap; |
36 | 37 |
37 namespace base { | 38 namespace base { |
38 class SharedMemory; | 39 class SharedMemory; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 uint32 last_modified); | 114 uint32 last_modified); |
114 virtual void DidReceiveManualData(const char* buffer, int length); | 115 virtual void DidReceiveManualData(const char* buffer, int length); |
115 virtual void DidFinishManualLoading(); | 116 virtual void DidFinishManualLoading(); |
116 virtual void DidManualLoadFail(); | 117 virtual void DidManualLoadFail(); |
117 virtual void InstallMissingPlugin(); | 118 virtual void InstallMissingPlugin(); |
118 virtual webkit::npapi::WebPluginResourceClient* CreateResourceClient( | 119 virtual webkit::npapi::WebPluginResourceClient* CreateResourceClient( |
119 unsigned long resource_id, const GURL& url, int notify_id); | 120 unsigned long resource_id, const GURL& url, int notify_id); |
120 virtual webkit::npapi::WebPluginResourceClient* CreateSeekableResourceClient( | 121 virtual webkit::npapi::WebPluginResourceClient* CreateSeekableResourceClient( |
121 unsigned long resource_id, int range_request_id); | 122 unsigned long resource_id, int range_request_id); |
122 | 123 |
| 124 CommandBufferProxy* CreateCommandBuffer(); |
| 125 void DestroyCommandBuffer(CommandBufferProxy* command_buffer); |
| 126 |
123 gfx::PluginWindowHandle GetPluginWindowHandle(); | 127 gfx::PluginWindowHandle GetPluginWindowHandle(); |
124 | 128 |
125 protected: | 129 protected: |
126 template<class WebPluginDelegateProxy> friend class DeleteTask; | 130 template<class WebPluginDelegateProxy> friend class DeleteTask; |
127 ~WebPluginDelegateProxy(); | 131 ~WebPluginDelegateProxy(); |
128 | 132 |
129 private: | 133 private: |
130 // Message handlers for messages that proxy WebPlugin methods, which | 134 // Message handlers for messages that proxy WebPlugin methods, which |
131 // we translate into calls to the real WebPlugin. | 135 // we translate into calls to the real WebPlugin. |
132 void OnSetWindow(gfx::PluginWindowHandle window); | 136 void OnSetWindow(gfx::PluginWindowHandle window); |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 // This lets us know which portion of the backing store has been painted into. | 278 // This lets us know which portion of the backing store has been painted into. |
275 gfx::Rect backing_store_painted_; | 279 gfx::Rect backing_store_painted_; |
276 | 280 |
277 // The url of the main frame hosting the plugin. | 281 // The url of the main frame hosting the plugin. |
278 GURL page_url_; | 282 GURL page_url_; |
279 | 283 |
280 DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateProxy); | 284 DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateProxy); |
281 }; | 285 }; |
282 | 286 |
283 #endif // CHROME_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H_ | 287 #endif // CHROME_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H_ |
OLD | NEW |