OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_RENDERER_NPAPI_WEBPLUGIN_DELEGATE_PROXY_H_ | 5 #ifndef CONTENT_RENDERER_NPAPI_WEBPLUGIN_DELEGATE_PROXY_H_ |
6 #define CONTENT_RENDERER_NPAPI_WEBPLUGIN_DELEGATE_PROXY_H_ | 6 #define CONTENT_RENDERER_NPAPI_WEBPLUGIN_DELEGATE_PROXY_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
8 #include <string> | 10 #include <string> |
9 #include <vector> | 11 #include <vector> |
10 | 12 |
| 13 #include "base/macros.h" |
11 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
13 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
14 #include "base/sequenced_task_runner_helpers.h" | 17 #include "base/sequenced_task_runner_helpers.h" |
| 18 #include "build/build_config.h" |
15 #include "content/child/npapi/webplugin_delegate.h" | 19 #include "content/child/npapi/webplugin_delegate.h" |
16 #include "content/public/common/webplugininfo.h" | 20 #include "content/public/common/webplugininfo.h" |
17 #include "ipc/ipc_listener.h" | 21 #include "ipc/ipc_listener.h" |
18 #include "ipc/ipc_message.h" | 22 #include "ipc/ipc_message.h" |
19 #include "ipc/ipc_sender.h" | 23 #include "ipc/ipc_sender.h" |
20 #include "ui/gfx/geometry/rect.h" | 24 #include "ui/gfx/geometry/rect.h" |
21 #include "ui/gfx/native_widget_types.h" | 25 #include "ui/gfx/native_widget_types.h" |
22 #include "url/gurl.h" | 26 #include "url/gurl.h" |
23 | 27 |
24 #if defined(OS_MACOSX) | 28 #if defined(OS_MACOSX) |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 void OnDidStartLoading(); | 150 void OnDidStartLoading(); |
147 void OnDidStopLoading(); | 151 void OnDidStopLoading(); |
148 void OnDeferResourceLoading(unsigned long resource_id, bool defer); | 152 void OnDeferResourceLoading(unsigned long resource_id, bool defer); |
149 void OnURLRedirectResponse(bool allow, int resource_id); | 153 void OnURLRedirectResponse(bool allow, int resource_id); |
150 void OnCheckIfRunInsecureContent(const GURL& url, bool* result); | 154 void OnCheckIfRunInsecureContent(const GURL& url, bool* result); |
151 #if defined(OS_MACOSX) | 155 #if defined(OS_MACOSX) |
152 void OnFocusChanged(bool focused); | 156 void OnFocusChanged(bool focused); |
153 void OnStartIme(); | 157 void OnStartIme(); |
154 // Accelerated (Core Animation) plugin implementation. | 158 // Accelerated (Core Animation) plugin implementation. |
155 void OnAcceleratedPluginEnabledRendering(); | 159 void OnAcceleratedPluginEnabledRendering(); |
156 void OnAcceleratedPluginAllocatedIOSurface(int32 width, | 160 void OnAcceleratedPluginAllocatedIOSurface(int32_t width, |
157 int32 height, | 161 int32_t height, |
158 uint32 surface_id); | 162 uint32_t surface_id); |
159 void OnAcceleratedPluginSwappedIOSurface(); | 163 void OnAcceleratedPluginSwappedIOSurface(); |
160 #endif | 164 #endif |
161 #if defined(OS_WIN) | 165 #if defined(OS_WIN) |
162 void OnSetWindowlessData(HANDLE modal_loop_pump_messages_event_handle, | 166 void OnSetWindowlessData(HANDLE modal_loop_pump_messages_event_handle, |
163 gfx::NativeViewId dummy_activation_window); | 167 gfx::NativeViewId dummy_activation_window); |
164 void OnNotifyIMEStatus(const int input_mode, const gfx::Rect& caret_rect); | 168 void OnNotifyIMEStatus(const int input_mode, const gfx::Rect& caret_rect); |
165 #endif | 169 #endif |
166 // Helper function that sends the UpdateGeometry message. | 170 // Helper function that sends the UpdateGeometry message. |
167 void SendUpdateGeometry(bool bitmaps_changed); | 171 void SendUpdateGeometry(bool bitmaps_changed); |
168 | 172 |
(...skipping 28 matching lines...) Expand all Loading... |
197 return transport_stores_[front_buffer_index()].bitmap.get(); | 201 return transport_stores_[front_buffer_index()].bitmap.get(); |
198 } | 202 } |
199 | 203 |
200 SharedMemoryBitmap* back_buffer_bitmap() const { | 204 SharedMemoryBitmap* back_buffer_bitmap() const { |
201 return transport_stores_[back_buffer_index()].bitmap.get(); | 205 return transport_stores_[back_buffer_index()].bitmap.get(); |
202 } | 206 } |
203 | 207 |
204 #if !defined(OS_WIN) | 208 #if !defined(OS_WIN) |
205 // Creates a process-local memory section and canvas. PlatformCanvas on | 209 // Creates a process-local memory section and canvas. PlatformCanvas on |
206 // Windows only works with a DIB, not arbitrary memory. | 210 // Windows only works with a DIB, not arbitrary memory. |
207 bool CreateLocalBitmap(std::vector<uint8>* memory, | 211 bool CreateLocalBitmap(std::vector<uint8_t>* memory, |
208 scoped_ptr<SkCanvas>* canvas); | 212 scoped_ptr<SkCanvas>* canvas); |
209 #endif | 213 #endif |
210 | 214 |
211 // Creates a shared memory section and canvas. | 215 // Creates a shared memory section and canvas. |
212 bool CreateSharedBitmap(scoped_ptr<SharedMemoryBitmap>* memory, | 216 bool CreateSharedBitmap(scoped_ptr<SharedMemoryBitmap>* memory, |
213 scoped_ptr<SkCanvas>* canvas); | 217 scoped_ptr<SkCanvas>* canvas); |
214 | 218 |
215 // Called for cleanup during plugin destruction. Normally right before the | 219 // Called for cleanup during plugin destruction. Normally right before the |
216 // plugin window gets destroyed, or when the plugin has crashed (at which | 220 // plugin window gets destroyed, or when the plugin has crashed (at which |
217 // point the window has already been destroyed). | 221 // point the window has already been destroyed). |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 | 277 |
274 // The url of the main frame hosting the plugin. | 278 // The url of the main frame hosting the plugin. |
275 GURL page_url_; | 279 GURL page_url_; |
276 | 280 |
277 DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateProxy); | 281 DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateProxy); |
278 }; | 282 }; |
279 | 283 |
280 } // namespace content | 284 } // namespace content |
281 | 285 |
282 #endif // CONTENT_RENDERER_NPAPI_WEBPLUGIN_DELEGATE_PROXY_H_ | 286 #endif // CONTENT_RENDERER_NPAPI_WEBPLUGIN_DELEGATE_PROXY_H_ |
OLD | NEW |