| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_CHILD_NPOBJECT_PROXY_H_ | 8 #ifndef CONTENT_CHILD_NPOBJECT_PROXY_H_ |
| 9 #define CONTENT_CHILD_NPOBJECT_PROXY_H_ | 9 #define CONTENT_CHILD_NPOBJECT_PROXY_H_ |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 // returns the marshalled result. | 31 // returns the marshalled result. |
| 32 class NPObjectProxy : public IPC::Listener, | 32 class NPObjectProxy : public IPC::Listener, |
| 33 public IPC::Sender, | 33 public IPC::Sender, |
| 34 public NPObjectBase { | 34 public NPObjectBase { |
| 35 public: | 35 public: |
| 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 NPP owner); |
| 42 | 43 |
| 43 // IPC::Sender implementation: | 44 // IPC::Sender implementation: |
| 44 virtual bool Send(IPC::Message* msg) OVERRIDE; | 45 virtual bool Send(IPC::Message* msg) OVERRIDE; |
| 45 int route_id() { return route_id_; } | 46 int route_id() { return route_id_; } |
| 46 NPChannelBase* channel() { return channel_.get(); } | 47 NPChannelBase* channel() { return channel_.get(); } |
| 47 | 48 |
| 48 // The next 9 functions are called on NPObjects from the plugin and browser. | 49 // The next 9 functions are called on NPObjects from the plugin and browser. |
| 49 static bool NPHasMethod(NPObject *obj, | 50 static bool NPHasMethod(NPObject *obj, |
| 50 NPIdentifier name); | 51 NPIdentifier name); |
| 51 static bool NPInvoke(NPObject *obj, | 52 static bool NPInvoke(NPObject *obj, |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 int route_id_; | 119 int route_id_; |
| 119 int render_view_id_; | 120 int render_view_id_; |
| 120 | 121 |
| 121 // The url of the main frame hosting the plugin. | 122 // The url of the main frame hosting the plugin. |
| 122 GURL page_url_; | 123 GURL page_url_; |
| 123 }; | 124 }; |
| 124 | 125 |
| 125 } // namespace content | 126 } // namespace content |
| 126 | 127 |
| 127 #endif // CONTENT_CHILD_NPOBJECT_PROXY_H_ | 128 #endif // CONTENT_CHILD_NPOBJECT_PROXY_H_ |
| OLD | NEW |