OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ | 5 #ifndef WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ |
6 #define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ | 6 #define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <list> | 9 #include <vector> |
10 | 10 |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/task.h" | 13 #include "base/task.h" |
14 #include "base/time.h" | 14 #include "base/time.h" |
15 #include "base/timer.h" | 15 #include "base/timer.h" |
16 #include "build/build_config.h" | 16 #include "build/build_config.h" |
17 #include "third_party/npapi/bindings/npapi.h" | 17 #include "third_party/npapi/bindings/npapi.h" |
18 #include "ui/gfx/native_widget_types.h" | 18 #include "ui/gfx/native_widget_types.h" |
19 #include "ui/gfx/rect.h" | 19 #include "ui/gfx/rect.h" |
20 #include "webkit/plugins/npapi/webplugin_delegate.h" | 20 #include "webkit/plugins/npapi/webplugin_delegate.h" |
21 #include "webkit/glue/webcursor.h" | 21 #include "webkit/glue/webcursor.h" |
22 | 22 |
23 #if defined(OS_WIN) && !defined(USE_AURA) | 23 #if defined(OS_WIN) && !defined(USE_AURA) |
24 #include "base/memory/weak_ptr.h" | 24 #include "base/memory/weak_ptr.h" |
25 #endif | 25 #endif |
26 | 26 |
27 #if defined(USE_X11) | 27 #if defined(USE_X11) |
28 #include "ui/base/x/x11_util.h" | 28 #include "ui/base/x/x11_util.h" |
29 | 29 |
30 typedef struct _GdkDrawable GdkPixmap; | 30 typedef struct _GdkDrawable GdkPixmap; |
31 #endif | 31 #endif |
32 | 32 |
33 class FilePath; | 33 class FilePath; |
34 | 34 |
35 namespace WebKit { | |
36 class WebMouseEvent; | |
37 } | |
38 | |
39 #if defined(OS_MACOSX) | 35 #if defined(OS_MACOSX) |
40 #ifdef __OBJC__ | 36 #ifdef __OBJC__ |
41 @class CALayer; | 37 @class CALayer; |
42 @class CARenderer; | 38 @class CARenderer; |
43 #else | 39 #else |
44 class CALayer; | 40 class CALayer; |
45 class CARenderer; | 41 class CARenderer; |
46 #endif | 42 #endif |
47 #endif | 43 #endif |
48 | 44 |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 void SetWindowlessShmPixmap(XID shm_pixmap) { | 226 void SetWindowlessShmPixmap(XID shm_pixmap) { |
231 windowless_shm_pixmap_ = shm_pixmap; | 227 windowless_shm_pixmap_ = shm_pixmap; |
232 } | 228 } |
233 #endif | 229 #endif |
234 | 230 |
235 private: | 231 private: |
236 friend class DeleteTask<WebPluginDelegateImpl>; | 232 friend class DeleteTask<WebPluginDelegateImpl>; |
237 friend class WebPluginDelegate; | 233 friend class WebPluginDelegate; |
238 | 234 |
239 WebPluginDelegateImpl(gfx::PluginWindowHandle containing_view, | 235 WebPluginDelegateImpl(gfx::PluginWindowHandle containing_view, |
240 PluginInstance *instance); | 236 PluginInstance* instance); |
241 virtual ~WebPluginDelegateImpl(); | 237 virtual ~WebPluginDelegateImpl(); |
242 | 238 |
243 // Called by Initialize() for platform-specific initialization. | 239 // Called by Initialize() for platform-specific initialization. |
244 // If this returns false, the plugin shouldn't be started--see Initialize(). | 240 // If this returns false, the plugin shouldn't be started--see Initialize(). |
245 bool PlatformInitialize(); | 241 bool PlatformInitialize(); |
246 | 242 |
247 // Called by DestroyInstance(), used for platform-specific destruction. | 243 // Called by DestroyInstance(), used for platform-specific destruction. |
248 void PlatformDestroyInstance(); | 244 void PlatformDestroyInstance(); |
249 | 245 |
250 //-------------------------- | 246 //-------------------------- |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 // True if NPP_New did not return an error. | 550 // True if NPP_New did not return an error. |
555 bool creation_succeeded_; | 551 bool creation_succeeded_; |
556 | 552 |
557 DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateImpl); | 553 DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateImpl); |
558 }; | 554 }; |
559 | 555 |
560 } // namespace npapi | 556 } // namespace npapi |
561 } // namespace webkit | 557 } // namespace webkit |
562 | 558 |
563 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ | 559 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ |
OLD | NEW |