| 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_PLUGIN_WEBPLUGIN_DELEGATE_STUB_H_ | 5 #ifndef CHROME_PLUGIN_WEBPLUGIN_DELEGATE_STUB_H_ |
| 6 #define CHROME_PLUGIN_WEBPLUGIN_DELEGATE_STUB_H_ | 6 #define CHROME_PLUGIN_WEBPLUGIN_DELEGATE_STUB_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 "base/ref_counted.h" | 12 #include "base/ref_counted.h" |
| 13 #include "base/shared_memory.h" | 13 #include "base/shared_memory.h" |
| 14 #include "base/task.h" | 14 #include "base/task.h" |
| 15 #include "chrome/plugin/command_buffer_stub.h" |
| 15 #include "googleurl/src/gurl.h" | 16 #include "googleurl/src/gurl.h" |
| 16 #include "ipc/ipc_channel.h" | 17 #include "ipc/ipc_channel.h" |
| 17 #include "third_party/npapi/bindings/npapi.h" | 18 #include "third_party/npapi/bindings/npapi.h" |
| 18 #include "ui/gfx/native_widget_types.h" | |
| 19 #include "ui/gfx/rect.h" | 19 #include "ui/gfx/rect.h" |
| 20 | 20 |
| 21 class PluginChannel; | 21 class PluginChannel; |
| 22 class WebPluginProxy; | 22 class WebPluginProxy; |
| 23 struct PluginMsg_Init_Params; | 23 struct PluginMsg_Init_Params; |
| 24 struct PluginMsg_DidReceiveResponseParams; | 24 struct PluginMsg_DidReceiveResponseParams; |
| 25 struct PluginMsg_UpdateGeometry_Param; | 25 struct PluginMsg_UpdateGeometry_Param; |
| 26 class WebCursor; | 26 class WebCursor; |
| 27 | 27 |
| 28 namespace WebKit { | 28 namespace WebKit { |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 const GURL& url, | 96 const GURL& url, |
| 97 const PluginMsg_DidReceiveResponseParams& params); | 97 const PluginMsg_DidReceiveResponseParams& params); |
| 98 void OnDidReceiveManualData(const std::vector<char>& buffer); | 98 void OnDidReceiveManualData(const std::vector<char>& buffer); |
| 99 void OnDidFinishManualLoading(); | 99 void OnDidFinishManualLoading(); |
| 100 void OnDidManualLoadFail(); | 100 void OnDidManualLoadFail(); |
| 101 void OnInstallMissingPlugin(); | 101 void OnInstallMissingPlugin(); |
| 102 void OnHandleURLRequestReply(unsigned long resource_id, | 102 void OnHandleURLRequestReply(unsigned long resource_id, |
| 103 const GURL& url, | 103 const GURL& url, |
| 104 int notify_id); | 104 int notify_id); |
| 105 void OnHTTPRangeRequestReply(unsigned long resource_id, int range_request_id); | 105 void OnHTTPRangeRequestReply(unsigned long resource_id, int range_request_id); |
| 106 void OnCreateCommandBuffer(int* route_id); |
| 107 void OnDestroyCommandBuffer(); |
| 106 | 108 |
| 107 void CreateSharedBuffer(uint32 size, | 109 void CreateSharedBuffer(uint32 size, |
| 108 base::SharedMemory* shared_buf, | 110 base::SharedMemory* shared_buf, |
| 109 base::SharedMemoryHandle* remote_handle); | 111 base::SharedMemoryHandle* remote_handle); |
| 110 | 112 |
| 111 std::string mime_type_; | 113 std::string mime_type_; |
| 112 int instance_id_; | 114 int instance_id_; |
| 113 | 115 |
| 114 scoped_refptr<PluginChannel> channel_; | 116 scoped_refptr<PluginChannel> channel_; |
| 115 | 117 |
| 116 webkit::npapi::WebPluginDelegateImpl* delegate_; | 118 webkit::npapi::WebPluginDelegateImpl* delegate_; |
| 117 WebPluginProxy* webplugin_; | 119 WebPluginProxy* webplugin_; |
| 118 bool in_destructor_; | 120 bool in_destructor_; |
| 119 | 121 |
| 120 // The url of the main frame hosting the plugin. | 122 // The url of the main frame hosting the plugin. |
| 121 GURL page_url_; | 123 GURL page_url_; |
| 122 | 124 |
| 123 #if defined(ENABLE_GPU) | 125 #if defined(ENABLE_GPU) |
| 126 // If this is the GPU plugin, the stub object that forwards to the |
| 127 // command buffer service. |
| 128 scoped_ptr<CommandBufferStub> command_buffer_stub_; |
| 129 |
| 124 #if defined(OS_MACOSX) | 130 #if defined(OS_MACOSX) |
| 125 // If this is a GPU-accelerated plug-in, we need to be able to receive a fake | 131 // If this is a GPU-accelerated plug-in, we need to be able to receive a fake |
| 126 // window handle which is used for subsequent communication back to the | 132 // window handle which is used for subsequent communication back to the |
| 127 // browser. | 133 // browser. |
| 128 void OnSetFakeAcceleratedSurfaceWindowHandle(gfx::PluginWindowHandle window); | 134 void OnSetFakeAcceleratedSurfaceWindowHandle(gfx::PluginWindowHandle window); |
| 129 #endif | 135 #endif |
| 136 |
| 130 #endif | 137 #endif |
| 131 | 138 |
| 132 DISALLOW_IMPLICIT_CONSTRUCTORS(WebPluginDelegateStub); | 139 DISALLOW_IMPLICIT_CONSTRUCTORS(WebPluginDelegateStub); |
| 133 }; | 140 }; |
| 134 | 141 |
| 135 #endif // CHROME_PLUGIN_WEBPLUGIN_DELEGATE_STUB_H_ | 142 #endif // CHROME_PLUGIN_WEBPLUGIN_DELEGATE_STUB_H_ |
| OLD | NEW |