| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 #include "third_party/WebKit/Source/Platform/chromium/public/WebURLResponse.h" | 51 #include "third_party/WebKit/Source/Platform/chromium/public/WebURLResponse.h" |
| 52 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" | 52 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" |
| 53 #include "third_party/WebKit/Source/WebKit/chromium/public/WebUserGestureToken.h
" | 53 #include "third_party/WebKit/Source/WebKit/chromium/public/WebUserGestureToken.h
" |
| 54 #include "ui/base/ime/text_input_type.h" | 54 #include "ui/base/ime/text_input_type.h" |
| 55 #include "ui/gfx/rect.h" | 55 #include "ui/gfx/rect.h" |
| 56 #include "webkit/plugins/ppapi/plugin_delegate.h" | 56 #include "webkit/plugins/ppapi/plugin_delegate.h" |
| 57 #include "webkit/plugins/ppapi/ppp_pdf.h" | 57 #include "webkit/plugins/ppapi/ppp_pdf.h" |
| 58 #include "webkit/plugins/webkit_plugins_export.h" | 58 #include "webkit/plugins/webkit_plugins_export.h" |
| 59 | 59 |
| 60 struct PP_Point; | 60 struct PP_Point; |
| 61 struct _NPP; | |
| 62 | 61 |
| 63 class SkBitmap; | 62 class SkBitmap; |
| 64 class TransportDIB; | 63 class TransportDIB; |
| 65 | 64 |
| 66 namespace WebKit { | 65 namespace WebKit { |
| 67 class WebInputEvent; | 66 class WebInputEvent; |
| 68 class WebLayer; | 67 class WebLayer; |
| 69 class WebMouseEvent; | 68 class WebMouseEvent; |
| 70 class WebPluginContainer; | 69 class WebPluginContainer; |
| 71 class WebURLLoader; | 70 class WebURLLoader; |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 // to an untrusted NaCl out-of-process instance. | 495 // to an untrusted NaCl out-of-process instance. |
| 497 PP_NaClResult ResetAsProxied(scoped_refptr<PluginModule> module); | 496 PP_NaClResult ResetAsProxied(scoped_refptr<PluginModule> module); |
| 498 | 497 |
| 499 // Checks whether this is a valid instance of the given module. After calling | 498 // Checks whether this is a valid instance of the given module. After calling |
| 500 // ResetAsProxied above, a NaCl plugin instance's module changes, so external | 499 // ResetAsProxied above, a NaCl plugin instance's module changes, so external |
| 501 // hosts won't recognize it as a valid instance of the original module. This | 500 // hosts won't recognize it as a valid instance of the original module. This |
| 502 // method fixes that be checking that either module_ or original_module_ match | 501 // method fixes that be checking that either module_ or original_module_ match |
| 503 // the given module. | 502 // the given module. |
| 504 bool IsValidInstanceOf(PluginModule* module); | 503 bool IsValidInstanceOf(PluginModule* module); |
| 505 | 504 |
| 506 // Returns the plugin NPP identifier that this plugin will use to identify | |
| 507 // itself when making NPObject scripting calls to WebBindings. | |
| 508 struct _NPP* instanceNPP(); | |
| 509 | |
| 510 private: | 505 private: |
| 511 friend class PpapiUnittest; | 506 friend class PpapiUnittest; |
| 512 | 507 |
| 513 // Class to record document load notifications and play them back once the | 508 // Class to record document load notifications and play them back once the |
| 514 // real document loader becomes available. Used only by NaCl instances. | 509 // real document loader becomes available. Used only by NaCl instances. |
| 515 class NaClDocumentLoader : public WebKit::WebURLLoaderClient { | 510 class NaClDocumentLoader : public WebKit::WebURLLoaderClient { |
| 516 public: | 511 public: |
| 517 NaClDocumentLoader(); | 512 NaClDocumentLoader(); |
| 518 virtual ~NaClDocumentLoader(); | 513 virtual ~NaClDocumentLoader(); |
| 519 | 514 |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 832 WebKit::WebURLLoaderClient* document_loader_; | 827 WebKit::WebURLLoaderClient* document_loader_; |
| 833 // State for deferring document loads. Used only by NaCl instances. | 828 // State for deferring document loads. Used only by NaCl instances. |
| 834 WebKit::WebURLResponse nacl_document_response_; | 829 WebKit::WebURLResponse nacl_document_response_; |
| 835 scoped_ptr<NaClDocumentLoader> nacl_document_loader_; | 830 scoped_ptr<NaClDocumentLoader> nacl_document_loader_; |
| 836 bool nacl_document_load_; | 831 bool nacl_document_load_; |
| 837 | 832 |
| 838 // The ContentDecryptorDelegate forwards PPP_ContentDecryptor_Private | 833 // The ContentDecryptorDelegate forwards PPP_ContentDecryptor_Private |
| 839 // calls and handles PPB_ContentDecryptor_Private calls. | 834 // calls and handles PPB_ContentDecryptor_Private calls. |
| 840 scoped_ptr<ContentDecryptorDelegate> content_decryptor_delegate_; | 835 scoped_ptr<ContentDecryptorDelegate> content_decryptor_delegate_; |
| 841 | 836 |
| 842 // Dummy NPP value used when calling in to WebBindings, to allow the bindings | |
| 843 // to correctly track NPObjects belonging to this plugin instance. | |
| 844 scoped_ptr<struct _NPP> npp_; | |
| 845 | |
| 846 friend class PpapiPluginInstanceTest; | 837 friend class PpapiPluginInstanceTest; |
| 847 DISALLOW_COPY_AND_ASSIGN(PluginInstance); | 838 DISALLOW_COPY_AND_ASSIGN(PluginInstance); |
| 848 }; | 839 }; |
| 849 | 840 |
| 850 } // namespace ppapi | 841 } // namespace ppapi |
| 851 } // namespace webkit | 842 } // namespace webkit |
| 852 | 843 |
| 853 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ | 844 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ |
| OLD | NEW |