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> |
(...skipping 11 matching lines...) Expand all Loading... |
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 { |
29 class WebInputEvent; | 29 class WebInputEvent; |
30 } | 30 } |
31 | 31 |
| 32 namespace webkit { |
| 33 namespace npapi { |
32 class WebPluginDelegateImpl; | 34 class WebPluginDelegateImpl; |
| 35 } |
| 36 } |
33 | 37 |
34 // Converts the IPC messages from WebPluginDelegateProxy into calls to the | 38 // Converts the IPC messages from WebPluginDelegateProxy into calls to the |
35 // actual WebPluginDelegateImpl object. | 39 // actual WebPluginDelegateImpl object. |
36 class WebPluginDelegateStub : public IPC::Channel::Listener, | 40 class WebPluginDelegateStub : public IPC::Channel::Listener, |
37 public IPC::Message::Sender, | 41 public IPC::Message::Sender, |
38 public base::RefCounted<WebPluginDelegateStub> { | 42 public base::RefCounted<WebPluginDelegateStub> { |
39 public: | 43 public: |
40 WebPluginDelegateStub(const std::string& mime_type, int instance_id, | 44 WebPluginDelegateStub(const std::string& mime_type, int instance_id, |
41 PluginChannel* channel); | 45 PluginChannel* channel); |
42 | 46 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 | 108 |
105 void CreateSharedBuffer(uint32 size, | 109 void CreateSharedBuffer(uint32 size, |
106 base::SharedMemory* shared_buf, | 110 base::SharedMemory* shared_buf, |
107 base::SharedMemoryHandle* remote_handle); | 111 base::SharedMemoryHandle* remote_handle); |
108 | 112 |
109 std::string mime_type_; | 113 std::string mime_type_; |
110 int instance_id_; | 114 int instance_id_; |
111 | 115 |
112 scoped_refptr<PluginChannel> channel_; | 116 scoped_refptr<PluginChannel> channel_; |
113 | 117 |
114 WebPluginDelegateImpl* delegate_; | 118 webkit::npapi::WebPluginDelegateImpl* delegate_; |
115 WebPluginProxy* webplugin_; | 119 WebPluginProxy* webplugin_; |
116 bool in_destructor_; | 120 bool in_destructor_; |
117 | 121 |
118 // The url of the main frame hosting the plugin. | 122 // The url of the main frame hosting the plugin. |
119 GURL page_url_; | 123 GURL page_url_; |
120 | 124 |
121 #if defined(ENABLE_GPU) | 125 #if defined(ENABLE_GPU) |
122 // If this is the GPU plugin, the stub object that forwards to the | 126 // If this is the GPU plugin, the stub object that forwards to the |
123 // command buffer service. | 127 // command buffer service. |
124 scoped_ptr<CommandBufferStub> command_buffer_stub_; | 128 scoped_ptr<CommandBufferStub> command_buffer_stub_; |
125 | 129 |
126 #if defined(OS_MACOSX) | 130 #if defined(OS_MACOSX) |
127 // 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 |
128 // window handle which is used for subsequent communication back to the | 132 // window handle which is used for subsequent communication back to the |
129 // browser. | 133 // browser. |
130 void OnSetFakeAcceleratedSurfaceWindowHandle(gfx::PluginWindowHandle window); | 134 void OnSetFakeAcceleratedSurfaceWindowHandle(gfx::PluginWindowHandle window); |
131 #endif | 135 #endif |
132 | 136 |
133 #endif | 137 #endif |
134 | 138 |
135 DISALLOW_IMPLICIT_CONSTRUCTORS(WebPluginDelegateStub); | 139 DISALLOW_IMPLICIT_CONSTRUCTORS(WebPluginDelegateStub); |
136 }; | 140 }; |
137 | 141 |
138 #endif // CHROME_PLUGIN_WEBPLUGIN_DELEGATE_STUB_H_ | 142 #endif // CHROME_PLUGIN_WEBPLUGIN_DELEGATE_STUB_H_ |
OLD | NEW |