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