| 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_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ |
| 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "cc/layers/texture_layer_client.h" | 21 #include "cc/layers/texture_layer_client.h" |
| 22 #include "content/common/content_export.h" | 22 #include "content/common/content_export.h" |
| 23 #include "content/public/renderer/pepper_plugin_instance.h" | 23 #include "content/public/renderer/pepper_plugin_instance.h" |
| 24 #include "content/public/renderer/plugin_instance_throttler.h" | 24 #include "content/public/renderer/plugin_instance_throttler.h" |
| 25 #include "content/public/renderer/render_frame.h" | 25 #include "content/public/renderer/render_frame.h" |
| 26 #include "content/public/renderer/render_frame_observer.h" | 26 #include "content/public/renderer/render_frame_observer.h" |
| 27 #include "content/renderer/mouse_lock_dispatcher.h" | 27 #include "content/renderer/mouse_lock_dispatcher.h" |
| 28 #include "gin/handle.h" | 28 #include "gin/handle.h" |
| 29 #include "ppapi/c/dev/pp_cursor_type_dev.h" | 29 #include "ppapi/c/dev/pp_cursor_type_dev.h" |
| 30 #include "ppapi/c/dev/ppp_printing_dev.h" | 30 #include "ppapi/c/dev/ppp_printing_dev.h" |
| 31 #include "ppapi/c/dev/ppp_selection_dev.h" | |
| 32 #include "ppapi/c/dev/ppp_text_input_dev.h" | 31 #include "ppapi/c/dev/ppp_text_input_dev.h" |
| 33 #include "ppapi/c/dev/ppp_zoom_dev.h" | |
| 34 #include "ppapi/c/pp_completion_callback.h" | 32 #include "ppapi/c/pp_completion_callback.h" |
| 35 #include "ppapi/c/pp_instance.h" | 33 #include "ppapi/c/pp_instance.h" |
| 36 #include "ppapi/c/pp_time.h" | 34 #include "ppapi/c/pp_time.h" |
| 37 #include "ppapi/c/pp_var.h" | 35 #include "ppapi/c/pp_var.h" |
| 38 #include "ppapi/c/ppb_audio_config.h" | 36 #include "ppapi/c/ppb_audio_config.h" |
| 39 #include "ppapi/c/ppb_gamepad.h" | 37 #include "ppapi/c/ppb_gamepad.h" |
| 40 #include "ppapi/c/ppb_input_event.h" | 38 #include "ppapi/c/ppb_input_event.h" |
| 41 #include "ppapi/c/ppp_graphics_3d.h" | 39 #include "ppapi/c/ppp_graphics_3d.h" |
| 42 #include "ppapi/c/ppp_input_event.h" | 40 #include "ppapi/c/ppp_input_event.h" |
| 43 #include "ppapi/c/ppp_mouse_lock.h" | 41 #include "ppapi/c/ppp_mouse_lock.h" |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 // send Flush callbacks to the plugin for Graphics2D/3D. | 239 // send Flush callbacks to the plugin for Graphics2D/3D. |
| 242 void ViewInitiatedPaint(); | 240 void ViewInitiatedPaint(); |
| 243 | 241 |
| 244 // Tracks all live PluginObjects. | 242 // Tracks all live PluginObjects. |
| 245 void AddPluginObject(PluginObject* plugin_object); | 243 void AddPluginObject(PluginObject* plugin_object); |
| 246 void RemovePluginObject(PluginObject* plugin_object); | 244 void RemovePluginObject(PluginObject* plugin_object); |
| 247 | 245 |
| 248 base::string16 GetSelectedText(bool html); | 246 base::string16 GetSelectedText(bool html); |
| 249 base::string16 GetLinkAtPosition(const gfx::Point& point); | 247 base::string16 GetLinkAtPosition(const gfx::Point& point); |
| 250 void RequestSurroundingText(size_t desired_number_of_characters); | 248 void RequestSurroundingText(size_t desired_number_of_characters); |
| 251 void Zoom(double factor, bool text_only); | |
| 252 bool StartFind(const base::string16& search_text, | 249 bool StartFind(const base::string16& search_text, |
| 253 bool case_sensitive, | 250 bool case_sensitive, |
| 254 int identifier); | 251 int identifier); |
| 255 void SelectFindResult(bool forward); | 252 void SelectFindResult(bool forward); |
| 256 void StopFind(); | 253 void StopFind(); |
| 257 | 254 |
| 258 bool SupportsPrintInterface(); | 255 bool SupportsPrintInterface(); |
| 259 bool IsPrintScalingDisabled(); | 256 bool IsPrintScalingDisabled(); |
| 260 int PrintBegin(const blink::WebPrintParams& print_params); | 257 int PrintBegin(const blink::WebPrintParams& print_params); |
| 261 bool PrintPage(int page_number, blink::WebCanvas* canvas); | 258 bool PrintPage(int page_number, blink::WebCanvas* canvas); |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 PP_Bool GetScreenSize(PP_Instance instance, PP_Size* size) override; | 416 PP_Bool GetScreenSize(PP_Instance instance, PP_Size* size) override; |
| 420 ppapi::Resource* GetSingletonResource(PP_Instance instance, | 417 ppapi::Resource* GetSingletonResource(PP_Instance instance, |
| 421 ppapi::SingletonResourceID id) override; | 418 ppapi::SingletonResourceID id) override; |
| 422 int32_t RequestInputEvents(PP_Instance instance, | 419 int32_t RequestInputEvents(PP_Instance instance, |
| 423 uint32_t event_classes) override; | 420 uint32_t event_classes) override; |
| 424 int32_t RequestFilteringInputEvents(PP_Instance instance, | 421 int32_t RequestFilteringInputEvents(PP_Instance instance, |
| 425 uint32_t event_classes) override; | 422 uint32_t event_classes) override; |
| 426 void ClearInputEventRequest(PP_Instance instance, | 423 void ClearInputEventRequest(PP_Instance instance, |
| 427 uint32_t event_classes) override; | 424 uint32_t event_classes) override; |
| 428 void StartTrackingLatency(PP_Instance instance) override; | 425 void StartTrackingLatency(PP_Instance instance) override; |
| 429 void ZoomChanged(PP_Instance instance, double factor) override; | |
| 430 void ZoomLimitsChanged(PP_Instance instance, | |
| 431 double minimum_factor, | |
| 432 double maximum_factor) override; | |
| 433 void PostMessage(PP_Instance instance, PP_Var message) override; | 426 void PostMessage(PP_Instance instance, PP_Var message) override; |
| 434 int32_t RegisterMessageHandler(PP_Instance instance, | 427 int32_t RegisterMessageHandler(PP_Instance instance, |
| 435 void* user_data, | 428 void* user_data, |
| 436 const PPP_MessageHandler_0_2* handler, | 429 const PPP_MessageHandler_0_2* handler, |
| 437 PP_Resource message_loop) override; | 430 PP_Resource message_loop) override; |
| 438 void UnregisterMessageHandler(PP_Instance instance) override; | 431 void UnregisterMessageHandler(PP_Instance instance) override; |
| 439 PP_Bool SetCursor(PP_Instance instance, | 432 PP_Bool SetCursor(PP_Instance instance, |
| 440 PP_MouseCursor_Type type, | 433 PP_MouseCursor_Type type, |
| 441 PP_Resource image, | 434 PP_Resource image, |
| 442 const PP_Point* hot_spot) override; | 435 const PP_Point* hot_spot) override; |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 blink::WebPluginContainer* container, | 596 blink::WebPluginContainer* container, |
| 604 const GURL& plugin_url); | 597 const GURL& plugin_url); |
| 605 | 598 |
| 606 bool LoadFindInterface(); | 599 bool LoadFindInterface(); |
| 607 bool LoadInputEventInterface(); | 600 bool LoadInputEventInterface(); |
| 608 bool LoadMouseLockInterface(); | 601 bool LoadMouseLockInterface(); |
| 609 bool LoadPdfInterface(); | 602 bool LoadPdfInterface(); |
| 610 bool LoadPrintInterface(); | 603 bool LoadPrintInterface(); |
| 611 bool LoadPrivateInterface(); | 604 bool LoadPrivateInterface(); |
| 612 bool LoadTextInputInterface(); | 605 bool LoadTextInputInterface(); |
| 613 bool LoadZoomInterface(); | |
| 614 | 606 |
| 615 // Update any transforms that should be applied to the texture layer. | 607 // Update any transforms that should be applied to the texture layer. |
| 616 void UpdateLayerTransform(); | 608 void UpdateLayerTransform(); |
| 617 | 609 |
| 618 // Determines if we think the plugin has focus, both content area and webkit | 610 // Determines if we think the plugin has focus, both content area and webkit |
| 619 // (see has_webkit_focus_ below). | 611 // (see has_webkit_focus_ below). |
| 620 bool PluginHasFocus() const; | 612 bool PluginHasFocus() const; |
| 621 void SendFocusChangeNotification(); | 613 void SendFocusChangeNotification(); |
| 622 | 614 |
| 623 void UpdateTouchEventRequest(); | 615 void UpdateTouchEventRequest(); |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 770 scoped_ptr<ppapi::thunk::ResourceCreationAPI> resource_creation_; | 762 scoped_ptr<ppapi::thunk::ResourceCreationAPI> resource_creation_; |
| 771 | 763 |
| 772 // The plugin-provided interfaces. | 764 // The plugin-provided interfaces. |
| 773 // When adding PPP interfaces, make sure to reset them in ResetAsProxied. | 765 // When adding PPP interfaces, make sure to reset them in ResetAsProxied. |
| 774 const PPP_Find_Private* plugin_find_interface_; | 766 const PPP_Find_Private* plugin_find_interface_; |
| 775 const PPP_InputEvent* plugin_input_event_interface_; | 767 const PPP_InputEvent* plugin_input_event_interface_; |
| 776 const PPP_MouseLock* plugin_mouse_lock_interface_; | 768 const PPP_MouseLock* plugin_mouse_lock_interface_; |
| 777 const PPP_Pdf* plugin_pdf_interface_; | 769 const PPP_Pdf* plugin_pdf_interface_; |
| 778 const PPP_Instance_Private* plugin_private_interface_; | 770 const PPP_Instance_Private* plugin_private_interface_; |
| 779 const PPP_TextInput_Dev* plugin_textinput_interface_; | 771 const PPP_TextInput_Dev* plugin_textinput_interface_; |
| 780 const PPP_Zoom_Dev* plugin_zoom_interface_; | |
| 781 | 772 |
| 782 // Flags indicating whether we have asked this plugin instance for the | 773 // Flags indicating whether we have asked this plugin instance for the |
| 783 // corresponding interfaces, so that we can ask only once. | 774 // corresponding interfaces, so that we can ask only once. |
| 784 // When adding flags, make sure to reset them in ResetAsProxied. | 775 // When adding flags, make sure to reset them in ResetAsProxied. |
| 785 bool checked_for_plugin_input_event_interface_; | 776 bool checked_for_plugin_input_event_interface_; |
| 786 bool checked_for_plugin_pdf_interface_; | 777 bool checked_for_plugin_pdf_interface_; |
| 787 | 778 |
| 788 // This is only valid between a successful PrintBegin call and a PrintEnd | 779 // This is only valid between a successful PrintBegin call and a PrintEnd |
| 789 // call. | 780 // call. |
| 790 PP_PrintSettings_Dev current_print_settings_; | 781 PP_PrintSettings_Dev current_print_settings_; |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 936 // view change events. | 927 // view change events. |
| 937 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; | 928 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; |
| 938 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; | 929 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; |
| 939 | 930 |
| 940 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); | 931 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); |
| 941 }; | 932 }; |
| 942 | 933 |
| 943 } // namespace content | 934 } // namespace content |
| 944 | 935 |
| 945 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ | 936 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ |
| OLD | NEW |