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 WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ |
6 #define WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 19 matching lines...) Expand all Loading... |
30 #include "ppapi/c/ppb_audio_config.h" | 30 #include "ppapi/c/ppb_audio_config.h" |
31 #include "ppapi/c/ppb_input_event.h" | 31 #include "ppapi/c/ppb_input_event.h" |
32 #include "ppapi/c/ppb_gamepad.h" | 32 #include "ppapi/c/ppb_gamepad.h" |
33 #include "ppapi/c/ppp_graphics_3d.h" | 33 #include "ppapi/c/ppp_graphics_3d.h" |
34 #include "ppapi/c/ppp_input_event.h" | 34 #include "ppapi/c/ppp_input_event.h" |
35 #include "ppapi/c/ppp_messaging.h" | 35 #include "ppapi/c/ppp_messaging.h" |
36 #include "ppapi/c/ppp_mouse_lock.h" | 36 #include "ppapi/c/ppp_mouse_lock.h" |
37 #include "ppapi/c/private/ppp_instance_private.h" | 37 #include "ppapi/c/private/ppp_instance_private.h" |
38 #include "ppapi/shared_impl/ppb_instance_shared.h" | 38 #include "ppapi/shared_impl/ppb_instance_shared.h" |
39 #include "ppapi/shared_impl/ppb_view_shared.h" | 39 #include "ppapi/shared_impl/ppb_view_shared.h" |
| 40 #include "ppapi/shared_impl/tracked_callback.h" |
40 #include "third_party/skia/include/core/SkRefCnt.h" | 41 #include "third_party/skia/include/core/SkRefCnt.h" |
41 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCanvas.h" | 42 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCanvas.h" |
42 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" | 43 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
43 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" | 44 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" |
44 #include "ui/base/ime/text_input_type.h" | 45 #include "ui/base/ime/text_input_type.h" |
45 #include "ui/gfx/rect.h" | 46 #include "ui/gfx/rect.h" |
46 #include "webkit/plugins/ppapi/plugin_delegate.h" | 47 #include "webkit/plugins/ppapi/plugin_delegate.h" |
47 #include "webkit/plugins/ppapi/ppb_flash_impl.h" | 48 #include "webkit/plugins/ppapi/ppb_flash_impl.h" |
48 #include "webkit/plugins/ppapi/ppp_pdf.h" | 49 #include "webkit/plugins/ppapi/ppp_pdf.h" |
49 #include "webkit/plugins/ppapi/resource_creation_impl.h" | 50 #include "webkit/plugins/ppapi/resource_creation_impl.h" |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 PP_TimeTicks timestamp); | 365 PP_TimeTicks timestamp); |
365 virtual void ZoomChanged(PP_Instance instance, double factor) OVERRIDE; | 366 virtual void ZoomChanged(PP_Instance instance, double factor) OVERRIDE; |
366 virtual void ZoomLimitsChanged(PP_Instance instance, | 367 virtual void ZoomLimitsChanged(PP_Instance instance, |
367 double minimum_factor, | 368 double minimum_factor, |
368 double maximium_factor) OVERRIDE; | 369 double maximium_factor) OVERRIDE; |
369 virtual void PostMessage(PP_Instance instance, PP_Var message) OVERRIDE; | 370 virtual void PostMessage(PP_Instance instance, PP_Var message) OVERRIDE; |
370 virtual PP_Bool SetCursor(PP_Instance instance, | 371 virtual PP_Bool SetCursor(PP_Instance instance, |
371 PP_MouseCursor_Type type, | 372 PP_MouseCursor_Type type, |
372 PP_Resource image, | 373 PP_Resource image, |
373 const PP_Point* hot_spot) OVERRIDE; | 374 const PP_Point* hot_spot) OVERRIDE; |
374 virtual int32_t LockMouse(PP_Instance instance, | 375 virtual int32_t LockMouse( |
375 PP_CompletionCallback callback) OVERRIDE; | 376 PP_Instance instance, |
| 377 scoped_refptr< ::ppapi::TrackedCallback> callback) OVERRIDE; |
376 virtual void UnlockMouse(PP_Instance instance) OVERRIDE; | 378 virtual void UnlockMouse(PP_Instance instance) OVERRIDE; |
377 virtual PP_Bool GetDefaultPrintSettings( | 379 virtual PP_Bool GetDefaultPrintSettings( |
378 PP_Instance instance, | 380 PP_Instance instance, |
379 PP_PrintSettings_Dev* print_settings) OVERRIDE; | 381 PP_PrintSettings_Dev* print_settings) OVERRIDE; |
380 virtual void SetTextInputType(PP_Instance instance, | 382 virtual void SetTextInputType(PP_Instance instance, |
381 PP_TextInput_Type type) OVERRIDE; | 383 PP_TextInput_Type type) OVERRIDE; |
382 virtual void UpdateCaretPosition(PP_Instance instance, | 384 virtual void UpdateCaretPosition(PP_Instance instance, |
383 const PP_Rect& caret, | 385 const PP_Rect& caret, |
384 const PP_Rect& bounding_box) OVERRIDE; | 386 const PP_Rect& bounding_box) OVERRIDE; |
385 virtual void CancelCompositionText(PP_Instance instance) OVERRIDE; | 387 virtual void CancelCompositionText(PP_Instance instance) OVERRIDE; |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
639 ui::TextInputType text_input_type_; | 641 ui::TextInputType text_input_type_; |
640 gfx::Rect text_input_caret_; | 642 gfx::Rect text_input_caret_; |
641 gfx::Rect text_input_caret_bounds_; | 643 gfx::Rect text_input_caret_bounds_; |
642 bool text_input_caret_set_; | 644 bool text_input_caret_set_; |
643 | 645 |
644 // Text selection status. | 646 // Text selection status. |
645 std::string surrounding_text_; | 647 std::string surrounding_text_; |
646 size_t selection_caret_; | 648 size_t selection_caret_; |
647 size_t selection_anchor_; | 649 size_t selection_anchor_; |
648 | 650 |
649 PP_CompletionCallback lock_mouse_callback_; | 651 scoped_refptr< ::ppapi::TrackedCallback> lock_mouse_callback_; |
650 | 652 |
651 // Track pending user gestures so out-of-process plugins can respond to | 653 // Track pending user gestures so out-of-process plugins can respond to |
652 // a user gesture after it has been processed. | 654 // a user gesture after it has been processed. |
653 PP_TimeTicks pending_user_gesture_; | 655 PP_TimeTicks pending_user_gesture_; |
654 | 656 |
655 // The Flash proxy is associated with the instance. | 657 // The Flash proxy is associated with the instance. |
656 PPB_Flash_Impl flash_impl_; | 658 PPB_Flash_Impl flash_impl_; |
657 | 659 |
658 // We store the arguments so we can re-send them if we are reset to talk to | 660 // We store the arguments so we can re-send them if we are reset to talk to |
659 // NaCl via the IPC NaCl proxy. | 661 // NaCl via the IPC NaCl proxy. |
660 std::vector<std::string> argn_; | 662 std::vector<std::string> argn_; |
661 std::vector<std::string> argv_; | 663 std::vector<std::string> argv_; |
662 | 664 |
663 // This is NULL unless HandleDocumentLoad has called. In that case, we store | 665 // This is NULL unless HandleDocumentLoad has called. In that case, we store |
664 // the pointer so we can re-send it later if we are reset to talk to NaCl. | 666 // the pointer so we can re-send it later if we are reset to talk to NaCl. |
665 scoped_refptr<PPB_URLLoader_Impl> document_loader_; | 667 scoped_refptr<PPB_URLLoader_Impl> document_loader_; |
666 | 668 |
667 DISALLOW_COPY_AND_ASSIGN(PluginInstance); | 669 DISALLOW_COPY_AND_ASSIGN(PluginInstance); |
668 }; | 670 }; |
669 | 671 |
670 } // namespace ppapi | 672 } // namespace ppapi |
671 } // namespace webkit | 673 } // namespace webkit |
672 | 674 |
673 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ | 675 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ |
OLD | NEW |