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; | |
30 struct NPObject; | 29 struct NPObject; |
31 class NPObjectStub; | 30 class NPObjectStub; |
32 struct NPVariant_Param; | 31 struct NPVariant_Param; |
33 class PluginChannelHost; | 32 class PluginChannelHost; |
34 struct PluginHostMsg_URLRequest_Params; | 33 struct PluginHostMsg_URLRequest_Params; |
35 class RenderView; | 34 class RenderView; |
36 class SkBitmap; | 35 class SkBitmap; |
37 | 36 |
38 namespace base { | 37 namespace base { |
39 class SharedMemory; | 38 class SharedMemory; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 uint32 last_modified); | 113 uint32 last_modified); |
115 virtual void DidReceiveManualData(const char* buffer, int length); | 114 virtual void DidReceiveManualData(const char* buffer, int length); |
116 virtual void DidFinishManualLoading(); | 115 virtual void DidFinishManualLoading(); |
117 virtual void DidManualLoadFail(); | 116 virtual void DidManualLoadFail(); |
118 virtual void InstallMissingPlugin(); | 117 virtual void InstallMissingPlugin(); |
119 virtual webkit::npapi::WebPluginResourceClient* CreateResourceClient( | 118 virtual webkit::npapi::WebPluginResourceClient* CreateResourceClient( |
120 unsigned long resource_id, const GURL& url, int notify_id); | 119 unsigned long resource_id, const GURL& url, int notify_id); |
121 virtual webkit::npapi::WebPluginResourceClient* CreateSeekableResourceClient( | 120 virtual webkit::npapi::WebPluginResourceClient* CreateSeekableResourceClient( |
122 unsigned long resource_id, int range_request_id); | 121 unsigned long resource_id, int range_request_id); |
123 | 122 |
124 CommandBufferProxy* CreateCommandBuffer(); | |
125 void DestroyCommandBuffer(CommandBufferProxy* command_buffer); | |
126 | |
127 gfx::PluginWindowHandle GetPluginWindowHandle(); | 123 gfx::PluginWindowHandle GetPluginWindowHandle(); |
128 | 124 |
129 protected: | 125 protected: |
130 template<class WebPluginDelegateProxy> friend class DeleteTask; | 126 template<class WebPluginDelegateProxy> friend class DeleteTask; |
131 ~WebPluginDelegateProxy(); | 127 ~WebPluginDelegateProxy(); |
132 | 128 |
133 private: | 129 private: |
134 // Message handlers for messages that proxy WebPlugin methods, which | 130 // Message handlers for messages that proxy WebPlugin methods, which |
135 // we translate into calls to the real WebPlugin. | 131 // we translate into calls to the real WebPlugin. |
136 void OnSetWindow(gfx::PluginWindowHandle window); | 132 void OnSetWindow(gfx::PluginWindowHandle window); |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 // This lets us know which portion of the backing store has been painted into. | 274 // This lets us know which portion of the backing store has been painted into. |
279 gfx::Rect backing_store_painted_; | 275 gfx::Rect backing_store_painted_; |
280 | 276 |
281 // The url of the main frame hosting the plugin. | 277 // The url of the main frame hosting the plugin. |
282 GURL page_url_; | 278 GURL page_url_; |
283 | 279 |
284 DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateProxy); | 280 DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateProxy); |
285 }; | 281 }; |
286 | 282 |
287 #endif // CHROME_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H_ | 283 #endif // CHROME_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H_ |
OLD | NEW |