| 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; |
| 61 | 62 |
| 62 class SkBitmap; | 63 class SkBitmap; |
| 63 class TransportDIB; | 64 class TransportDIB; |
| 64 | 65 |
| 65 namespace WebKit { | 66 namespace WebKit { |
| 66 class WebInputEvent; | 67 class WebInputEvent; |
| 67 class WebLayer; | 68 class WebLayer; |
| 68 class WebMouseEvent; | 69 class WebMouseEvent; |
| 69 class WebPluginContainer; | 70 class WebPluginContainer; |
| 70 class WebURLLoader; | 71 class WebURLLoader; |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 495 // to an untrusted NaCl out-of-process instance. | 496 // to an untrusted NaCl out-of-process instance. |
| 496 PP_NaClResult ResetAsProxied(scoped_refptr<PluginModule> module); | 497 PP_NaClResult ResetAsProxied(scoped_refptr<PluginModule> module); |
| 497 | 498 |
| 498 // Checks whether this is a valid instance of the given module. After calling | 499 // Checks whether this is a valid instance of the given module. After calling |
| 499 // ResetAsProxied above, a NaCl plugin instance's module changes, so external | 500 // ResetAsProxied above, a NaCl plugin instance's module changes, so external |
| 500 // hosts won't recognize it as a valid instance of the original module. This | 501 // hosts won't recognize it as a valid instance of the original module. This |
| 501 // method fixes that be checking that either module_ or original_module_ match | 502 // method fixes that be checking that either module_ or original_module_ match |
| 502 // the given module. | 503 // the given module. |
| 503 bool IsValidInstanceOf(PluginModule* module); | 504 bool IsValidInstanceOf(PluginModule* module); |
| 504 | 505 |
| 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 |
| 505 private: | 510 private: |
| 506 friend class PpapiUnittest; | 511 friend class PpapiUnittest; |
| 507 | 512 |
| 508 // Class to record document load notifications and play them back once the | 513 // Class to record document load notifications and play them back once the |
| 509 // real document loader becomes available. Used only by NaCl instances. | 514 // real document loader becomes available. Used only by NaCl instances. |
| 510 class NaClDocumentLoader : public WebKit::WebURLLoaderClient { | 515 class NaClDocumentLoader : public WebKit::WebURLLoaderClient { |
| 511 public: | 516 public: |
| 512 NaClDocumentLoader(); | 517 NaClDocumentLoader(); |
| 513 virtual ~NaClDocumentLoader(); | 518 virtual ~NaClDocumentLoader(); |
| 514 | 519 |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 827 WebKit::WebURLLoaderClient* document_loader_; | 832 WebKit::WebURLLoaderClient* document_loader_; |
| 828 // State for deferring document loads. Used only by NaCl instances. | 833 // State for deferring document loads. Used only by NaCl instances. |
| 829 WebKit::WebURLResponse nacl_document_response_; | 834 WebKit::WebURLResponse nacl_document_response_; |
| 830 scoped_ptr<NaClDocumentLoader> nacl_document_loader_; | 835 scoped_ptr<NaClDocumentLoader> nacl_document_loader_; |
| 831 bool nacl_document_load_; | 836 bool nacl_document_load_; |
| 832 | 837 |
| 833 // The ContentDecryptorDelegate forwards PPP_ContentDecryptor_Private | 838 // The ContentDecryptorDelegate forwards PPP_ContentDecryptor_Private |
| 834 // calls and handles PPB_ContentDecryptor_Private calls. | 839 // calls and handles PPB_ContentDecryptor_Private calls. |
| 835 scoped_ptr<ContentDecryptorDelegate> content_decryptor_delegate_; | 840 scoped_ptr<ContentDecryptorDelegate> content_decryptor_delegate_; |
| 836 | 841 |
| 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 |
| 837 friend class PpapiPluginInstanceTest; | 846 friend class PpapiPluginInstanceTest; |
| 838 DISALLOW_COPY_AND_ASSIGN(PluginInstance); | 847 DISALLOW_COPY_AND_ASSIGN(PluginInstance); |
| 839 }; | 848 }; |
| 840 | 849 |
| 841 } // namespace ppapi | 850 } // namespace ppapi |
| 842 } // namespace webkit | 851 } // namespace webkit |
| 843 | 852 |
| 844 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ | 853 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ |
| OLD | NEW |