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_CHILD_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ | 5 #ifndef CONTENT_CHILD_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ |
6 #define CONTENT_CHILD_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ | 6 #define CONTENT_CHILD_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 // Handle to the message filter hook | 430 // Handle to the message filter hook |
431 HHOOK handle_event_message_filter_hook_; | 431 HHOOK handle_event_message_filter_hook_; |
432 | 432 |
433 // Event which is set when the plugin enters a modal loop in the course | 433 // Event which is set when the plugin enters a modal loop in the course |
434 // of a NPP_HandleEvent call. | 434 // of a NPP_HandleEvent call. |
435 HANDLE handle_event_pump_messages_event_; | 435 HANDLE handle_event_pump_messages_event_; |
436 | 436 |
437 // This flag indicates whether we started tracking a user gesture message. | 437 // This flag indicates whether we started tracking a user gesture message. |
438 bool user_gesture_message_posted_; | 438 bool user_gesture_message_posted_; |
439 | 439 |
440 // Runnable Method Factory used to invoke the OnUserGestureEnd method | |
441 // asynchronously. | |
442 base::WeakPtrFactory<WebPluginDelegateImpl> user_gesture_msg_factory_; | |
443 | |
444 // Handle to the mouse hook installed for certain windowed plugins like | 440 // Handle to the mouse hook installed for certain windowed plugins like |
445 // flash. | 441 // flash. |
446 HHOOK mouse_hook_; | 442 HHOOK mouse_hook_; |
447 #endif | 443 #endif |
448 | 444 |
449 // Holds the depth of the HandleEvent callstack. | 445 // Holds the depth of the HandleEvent callstack. |
450 int handle_event_depth_; | 446 int handle_event_depth_; |
451 | 447 |
452 // Holds the current cursor set by the windowless plugin. | 448 // Holds the current cursor set by the windowless plugin. |
453 WebCursor current_windowless_cursor_; | 449 WebCursor current_windowless_cursor_; |
454 | 450 |
455 // Set to true initially and indicates if this is the first npp_setwindow | 451 // Set to true initially and indicates if this is the first npp_setwindow |
456 // call received by the plugin. | 452 // call received by the plugin. |
457 bool first_set_window_call_; | 453 bool first_set_window_call_; |
458 | 454 |
459 // True if the plugin thinks it has keyboard focus | 455 // True if the plugin thinks it has keyboard focus |
460 bool plugin_has_focus_; | 456 bool plugin_has_focus_; |
461 // True if the plugin element has focus within the web content, regardless of | 457 // True if the plugin element has focus within the web content, regardless of |
462 // whether its containing view currently has focus. | 458 // whether its containing view currently has focus. |
463 bool has_webkit_focus_; | 459 bool has_webkit_focus_; |
464 // True if the containing view currently has focus. | 460 // True if the containing view currently has focus. |
465 // Initially set to true so that plugin focus still works in environments | 461 // Initially set to true so that plugin focus still works in environments |
466 // where SetContentAreaHasFocus is never called. See | 462 // where SetContentAreaHasFocus is never called. See |
467 // https://bugs.webkit.org/show_bug.cgi?id=46013 for details. | 463 // https://bugs.webkit.org/show_bug.cgi?id=46013 for details. |
468 bool containing_view_has_focus_; | 464 bool containing_view_has_focus_; |
469 | 465 |
470 // True if NPP_New did not return an error. | 466 // True if NPP_New did not return an error. |
471 bool creation_succeeded_; | 467 bool creation_succeeded_; |
472 | 468 |
| 469 #if defined(OS_WIN) |
| 470 // Runnable Method Factory used to invoke the OnUserGestureEnd method |
| 471 // asynchronously. |
| 472 base::WeakPtrFactory<WebPluginDelegateImpl> user_gesture_msg_factory_; |
| 473 #endif |
| 474 |
473 DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateImpl); | 475 DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateImpl); |
474 }; | 476 }; |
475 | 477 |
476 } // namespace content | 478 } // namespace content |
477 | 479 |
478 #endif // CONTENT_CHILD_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ | 480 #endif // CONTENT_CHILD_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_ |
OLD | NEW |