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 <list> |
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) |
| 24 #include "base/memory/weak_ptr.h" |
| 25 #endif |
| 26 |
23 #if defined(USE_X11) | 27 #if defined(USE_X11) |
24 #include "ui/base/x/x11_util.h" | 28 #include "ui/base/x/x11_util.h" |
25 | 29 |
26 typedef struct _GdkDrawable GdkPixmap; | 30 typedef struct _GdkDrawable GdkPixmap; |
27 #endif | 31 #endif |
28 | 32 |
29 class FilePath; | 33 class FilePath; |
30 | 34 |
31 namespace WebKit { | 35 namespace WebKit { |
32 class WebMouseEvent; | 36 class WebMouseEvent; |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 | 516 |
513 // Event which is set when the plugin enters a modal loop in the course | 517 // Event which is set when the plugin enters a modal loop in the course |
514 // of a NPP_HandleEvent call. | 518 // of a NPP_HandleEvent call. |
515 HANDLE handle_event_pump_messages_event_; | 519 HANDLE handle_event_pump_messages_event_; |
516 | 520 |
517 // This flag indicates whether we started tracking a user gesture message. | 521 // This flag indicates whether we started tracking a user gesture message. |
518 bool user_gesture_message_posted_; | 522 bool user_gesture_message_posted_; |
519 | 523 |
520 // Runnable Method Factory used to invoke the OnUserGestureEnd method | 524 // Runnable Method Factory used to invoke the OnUserGestureEnd method |
521 // asynchronously. | 525 // asynchronously. |
522 ScopedRunnableMethodFactory<WebPluginDelegateImpl> user_gesture_msg_factory_; | 526 base::WeakPtrFactory<WebPluginDelegateImpl> user_gesture_msg_factory_; |
523 | 527 |
524 // Handle to the mouse hook installed for certain windowed plugins like | 528 // Handle to the mouse hook installed for certain windowed plugins like |
525 // flash. | 529 // flash. |
526 HHOOK mouse_hook_; | 530 HHOOK mouse_hook_; |
527 #endif | 531 #endif |
528 | 532 |
529 // Holds the depth of the HandleEvent callstack. | 533 // Holds the depth of the HandleEvent callstack. |
530 int handle_event_depth_; | 534 int handle_event_depth_; |
531 | 535 |
532 // Holds the current cursor set by the windowless plugin. | 536 // Holds the current cursor set by the windowless plugin. |
(...skipping 17 matching lines...) Expand all Loading... |
550 // True if NPP_New did not return an error. | 554 // True if NPP_New did not return an error. |
551 bool creation_succeeded_; | 555 bool creation_succeeded_; |
552 | 556 |
553 DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateImpl); | 557 DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateImpl); |
554 }; | 558 }; |
555 | 559 |
556 } // namespace npapi | 560 } // namespace npapi |
557 } // namespace webkit | 561 } // namespace webkit |
558 | 562 |
559 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ | 563 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ |
OLD | NEW |