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 // A proxy for NPObject that sends all calls to the object to an NPObjectStub | 5 // A proxy for NPObject that sends all calls to the object to an NPObjectStub |
6 // running in a different process. | 6 // running in a different process. |
7 | 7 |
8 #ifndef CONTENT_COMMON_CHILD_NPOBJECT_PROXY_H_ | 8 #ifndef CONTENT_COMMON_CHILD_NPOBJECT_PROXY_H_ |
9 #define CONTENT_COMMON_CHILD_NPOBJECT_PROXY_H_ | 9 #define CONTENT_COMMON_CHILD_NPOBJECT_PROXY_H_ |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 virtual ~NPObjectProxy(); | 36 virtual ~NPObjectProxy(); |
37 | 37 |
38 static NPObject* Create(NPChannelBase* channel, | 38 static NPObject* Create(NPChannelBase* channel, |
39 int route_id, | 39 int route_id, |
40 int render_view_id, | 40 int render_view_id, |
41 const GURL& page_url); | 41 const GURL& page_url); |
42 | 42 |
43 // IPC::Sender implementation: | 43 // IPC::Sender implementation: |
44 virtual bool Send(IPC::Message* msg) OVERRIDE; | 44 virtual bool Send(IPC::Message* msg) OVERRIDE; |
45 int route_id() { return route_id_; } | 45 int route_id() { return route_id_; } |
46 NPChannelBase* channel() { return channel_; } | 46 NPChannelBase* channel() { return channel_.get(); } |
47 | 47 |
48 // The next 9 functions are called on NPObjects from the plugin and browser. | 48 // The next 9 functions are called on NPObjects from the plugin and browser. |
49 static bool NPHasMethod(NPObject *obj, | 49 static bool NPHasMethod(NPObject *obj, |
50 NPIdentifier name); | 50 NPIdentifier name); |
51 static bool NPInvoke(NPObject *obj, | 51 static bool NPInvoke(NPObject *obj, |
52 NPIdentifier name, | 52 NPIdentifier name, |
53 const NPVariant *args, | 53 const NPVariant *args, |
54 uint32_t arg_count, | 54 uint32_t arg_count, |
55 NPVariant *result); | 55 NPVariant *result); |
56 static bool NPInvokeDefault(NPObject *npobj, | 56 static bool NPInvokeDefault(NPObject *npobj, |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 int route_id_; | 118 int route_id_; |
119 int render_view_id_; | 119 int render_view_id_; |
120 | 120 |
121 // The url of the main frame hosting the plugin. | 121 // The url of the main frame hosting the plugin. |
122 GURL page_url_; | 122 GURL page_url_; |
123 }; | 123 }; |
124 | 124 |
125 } // namespace content | 125 } // namespace content |
126 | 126 |
127 #endif // CONTENT_COMMON_CHILD_NPOBJECT_PROXY_H_ | 127 #endif // CONTENT_COMMON_CHILD_NPOBJECT_PROXY_H_ |
OLD | NEW |