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