OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "content/common/npobject_proxy.h" | 5 #include "content/common/npobject_proxy.h" |
6 | 6 |
7 #include "content/common/np_channel_base.h" | 7 #include "content/common/np_channel_base.h" |
8 #include "content/common/npobject_util.h" | 8 #include "content/common/npobject_util.h" |
9 #include "content/common/plugin_messages.h" | 9 #include "content/common/plugin_messages.h" |
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" |
11 #include "webkit/glue/webkit_glue.h" | 11 #include "webkit/glue/webkit_glue.h" |
12 #include "webkit/plugins/npapi/plugin_instance.h" | 12 #include "webkit/plugins/npapi/plugin_instance.h" |
13 #include "webkit/plugins/npapi/plugin_host.h" | 13 #include "webkit/plugins/npapi/plugin_host.h" |
14 | 14 |
15 using WebKit::WebBindings; | 15 using WebKit::WebBindings; |
16 | 16 |
| 17 namespace content { |
| 18 |
17 struct NPObjectWrapper { | 19 struct NPObjectWrapper { |
18 NPObject object; | 20 NPObject object; |
19 NPObjectProxy* proxy; | 21 NPObjectProxy* proxy; |
20 }; | 22 }; |
21 | 23 |
22 NPClass NPObjectProxy::npclass_proxy_ = { | 24 NPClass NPObjectProxy::npclass_proxy_ = { |
23 NP_CLASS_STRUCT_VERSION, | 25 NP_CLASS_STRUCT_VERSION, |
24 NPObjectProxy::NPAllocate, | 26 NPObjectProxy::NPAllocate, |
25 NPObjectProxy::NPDeallocate, | 27 NPObjectProxy::NPDeallocate, |
26 NPObjectProxy::NPPInvalidate, | 28 NPObjectProxy::NPPInvalidate, |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 proxy->Send(msg); | 491 proxy->Send(msg); |
490 // Send may delete proxy. | 492 // Send may delete proxy. |
491 proxy = NULL; | 493 proxy = NULL; |
492 if (!result) | 494 if (!result) |
493 return false; | 495 return false; |
494 | 496 |
495 CreateNPVariant( | 497 CreateNPVariant( |
496 result_param, channel.get(), result_var, containing_window, page_url); | 498 result_param, channel.get(), result_var, containing_window, page_url); |
497 return true; | 499 return true; |
498 } | 500 } |
| 501 |
| 502 } // namespace content |
OLD | NEW |