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> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
17 #include "base/string16.h" | 17 #include "base/string16.h" |
18 #include "googleurl/src/gurl.h" | 18 #include "googleurl/src/gurl.h" |
19 #include "ppapi/c/dev/pp_cursor_type_dev.h" | 19 #include "ppapi/c/dev/pp_cursor_type_dev.h" |
| 20 #include "ppapi/c/dev/ppp_content_decryption_module_dev.h" |
20 #include "ppapi/c/dev/ppp_printing_dev.h" | 21 #include "ppapi/c/dev/ppp_printing_dev.h" |
21 #include "ppapi/c/dev/ppp_find_dev.h" | 22 #include "ppapi/c/dev/ppp_find_dev.h" |
22 #include "ppapi/c/dev/ppp_selection_dev.h" | 23 #include "ppapi/c/dev/ppp_selection_dev.h" |
23 #include "ppapi/c/dev/ppp_text_input_dev.h" | 24 #include "ppapi/c/dev/ppp_text_input_dev.h" |
24 #include "ppapi/c/dev/ppp_zoom_dev.h" | 25 #include "ppapi/c/dev/ppp_zoom_dev.h" |
25 #include "ppapi/c/pp_completion_callback.h" | 26 #include "ppapi/c/pp_completion_callback.h" |
26 #include "ppapi/c/pp_instance.h" | 27 #include "ppapi/c/pp_instance.h" |
27 #include "ppapi/c/pp_resource.h" | 28 #include "ppapi/c/pp_resource.h" |
28 #include "ppapi/c/pp_time.h" | 29 #include "ppapi/c/pp_time.h" |
29 #include "ppapi/c/pp_var.h" | 30 #include "ppapi/c/pp_var.h" |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 bool IsPrintScalingDisabled(); | 231 bool IsPrintScalingDisabled(); |
231 int PrintBegin(const WebKit::WebPrintParams& print_params); | 232 int PrintBegin(const WebKit::WebPrintParams& print_params); |
232 bool PrintPage(int page_number, WebKit::WebCanvas* canvas); | 233 bool PrintPage(int page_number, WebKit::WebCanvas* canvas); |
233 void PrintEnd(); | 234 void PrintEnd(); |
234 | 235 |
235 bool CanRotateView(); | 236 bool CanRotateView(); |
236 void RotateView(WebKit::WebPlugin::RotationType type); | 237 void RotateView(WebKit::WebPlugin::RotationType type); |
237 | 238 |
238 void Graphics3DContextLost(); | 239 void Graphics3DContextLost(); |
239 | 240 |
| 241 bool AddKey(PP_Resource key); |
| 242 bool Decrypt(PP_Resource encypted_block, |
| 243 PP_Resource decrypted_block, |
| 244 PP_CompletionCallback callback); |
| 245 bool DecryptAndDecode(PP_Resource encypted_block, |
| 246 PP_Resource decrypted_frame, |
| 247 PP_CompletionCallback callback); |
| 248 |
240 // There are 2 implementations of the fullscreen interface | 249 // There are 2 implementations of the fullscreen interface |
241 // PPB_FlashFullscreen is used by Pepper Flash. | 250 // PPB_FlashFullscreen is used by Pepper Flash. |
242 // PPB_Fullscreen is intended for other applications including NaCl. | 251 // PPB_Fullscreen is intended for other applications including NaCl. |
243 // The two interface are mutually exclusive. | 252 // The two interface are mutually exclusive. |
244 | 253 |
245 // Implementation of PPB_FlashFullscreen. | 254 // Implementation of PPB_FlashFullscreen. |
246 | 255 |
247 // Because going to fullscreen is asynchronous (but going out is not), there | 256 // Because going to fullscreen is asynchronous (but going out is not), there |
248 // are 3 states: | 257 // are 3 states: |
249 // - normal : fullscreen_container_ == NULL | 258 // - normal : fullscreen_container_ == NULL |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 | 413 |
405 private: | 414 private: |
406 // See the static Create functions above for creating PluginInstance objects. | 415 // See the static Create functions above for creating PluginInstance objects. |
407 // This constructor is private so that we can hide the PPP_Instance_Combined | 416 // This constructor is private so that we can hide the PPP_Instance_Combined |
408 // details while still having 1 constructor to maintain for member | 417 // details while still having 1 constructor to maintain for member |
409 // initialization. | 418 // initialization. |
410 PluginInstance(PluginDelegate* delegate, | 419 PluginInstance(PluginDelegate* delegate, |
411 PluginModule* module, | 420 PluginModule* module, |
412 ::ppapi::PPP_Instance_Combined* instance_interface); | 421 ::ppapi::PPP_Instance_Combined* instance_interface); |
413 | 422 |
| 423 bool LoadContentDecryptionModuleInterface(); |
414 bool LoadFindInterface(); | 424 bool LoadFindInterface(); |
415 bool LoadInputEventInterface(); | 425 bool LoadInputEventInterface(); |
416 bool LoadMessagingInterface(); | 426 bool LoadMessagingInterface(); |
417 bool LoadMouseLockInterface(); | 427 bool LoadMouseLockInterface(); |
418 bool LoadPdfInterface(); | 428 bool LoadPdfInterface(); |
419 bool LoadPrintInterface(); | 429 bool LoadPrintInterface(); |
420 bool LoadPrivateInterface(); | 430 bool LoadPrivateInterface(); |
421 bool LoadSelectionInterface(); | 431 bool LoadSelectionInterface(); |
422 bool LoadTextInputInterface(); | 432 bool LoadTextInputInterface(); |
423 bool LoadZoomInterface(); | 433 bool LoadZoomInterface(); |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 bool has_webkit_focus_; | 536 bool has_webkit_focus_; |
527 bool has_content_area_focus_; | 537 bool has_content_area_focus_; |
528 | 538 |
529 // The id of the current find operation, or -1 if none is in process. | 539 // The id of the current find operation, or -1 if none is in process. |
530 int find_identifier_; | 540 int find_identifier_; |
531 | 541 |
532 // Helper object that creates resources. | 542 // Helper object that creates resources. |
533 ResourceCreationImpl resource_creation_; | 543 ResourceCreationImpl resource_creation_; |
534 | 544 |
535 // The plugin-provided interfaces. | 545 // The plugin-provided interfaces. |
| 546 const PPP_ContentDecryptionModule_Dev* plugin_decryption_interface_; |
536 const PPP_Find_Dev* plugin_find_interface_; | 547 const PPP_Find_Dev* plugin_find_interface_; |
537 const PPP_Messaging* plugin_messaging_interface_; | 548 const PPP_Messaging* plugin_messaging_interface_; |
538 const PPP_MouseLock* plugin_mouse_lock_interface_; | 549 const PPP_MouseLock* plugin_mouse_lock_interface_; |
539 const PPP_InputEvent* plugin_input_event_interface_; | 550 const PPP_InputEvent* plugin_input_event_interface_; |
540 const PPP_Instance_Private* plugin_private_interface_; | 551 const PPP_Instance_Private* plugin_private_interface_; |
541 const PPP_Pdf* plugin_pdf_interface_; | 552 const PPP_Pdf* plugin_pdf_interface_; |
542 const PPP_Selection_Dev* plugin_selection_interface_; | 553 const PPP_Selection_Dev* plugin_selection_interface_; |
543 const PPP_TextInput_Dev* plugin_textinput_interface_; | 554 const PPP_TextInput_Dev* plugin_textinput_interface_; |
544 const PPP_Zoom_Dev* plugin_zoom_interface_; | 555 const PPP_Zoom_Dev* plugin_zoom_interface_; |
545 | 556 |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
649 // The Flash proxy is associated with the instance. | 660 // The Flash proxy is associated with the instance. |
650 PPB_Flash_Impl flash_impl_; | 661 PPB_Flash_Impl flash_impl_; |
651 | 662 |
652 DISALLOW_COPY_AND_ASSIGN(PluginInstance); | 663 DISALLOW_COPY_AND_ASSIGN(PluginInstance); |
653 }; | 664 }; |
654 | 665 |
655 } // namespace ppapi | 666 } // namespace ppapi |
656 } // namespace webkit | 667 } // namespace webkit |
657 | 668 |
658 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ | 669 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ |
OLD | NEW |