OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_PLUGIN_NPOBJECT_PROXY_H_ | 8 #ifndef CHROME_PLUGIN_NPOBJECT_PROXY_H_ |
9 #define CHROME_PLUGIN_NPOBJECT_PROXY_H_ | 9 #define CHROME_PLUGIN_NPOBJECT_PROXY_H_ |
10 #pragma once | 10 #pragma once |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 95 |
96 virtual IPC::Channel::Listener* GetChannelListener(); | 96 virtual IPC::Channel::Listener* GetChannelListener(); |
97 | 97 |
98 private: | 98 private: |
99 NPObjectProxy(PluginChannelBase* channel, | 99 NPObjectProxy(PluginChannelBase* channel, |
100 int route_id, | 100 int route_id, |
101 gfx::NativeViewId containing_window, | 101 gfx::NativeViewId containing_window, |
102 const GURL& page_url); | 102 const GURL& page_url); |
103 | 103 |
104 // IPC::Channel::Listener implementation: | 104 // IPC::Channel::Listener implementation: |
105 virtual void OnMessageReceived(const IPC::Message& msg); | 105 virtual bool OnMessageReceived(const IPC::Message& msg); |
106 virtual void OnChannelError(); | 106 virtual void OnChannelError(); |
107 | 107 |
108 static NPObject* NPAllocate(NPP, NPClass*); | 108 static NPObject* NPAllocate(NPP, NPClass*); |
109 static void NPDeallocate(NPObject* npObj); | 109 static void NPDeallocate(NPObject* npObj); |
110 | 110 |
111 // This function is only caled on NPObjects from the plugin. | 111 // This function is only caled on NPObjects from the plugin. |
112 static void NPPInvalidate(NPObject *obj); | 112 static void NPPInvalidate(NPObject *obj); |
113 static NPClass npclass_proxy_; | 113 static NPClass npclass_proxy_; |
114 | 114 |
115 scoped_refptr<PluginChannelBase> channel_; | 115 scoped_refptr<PluginChannelBase> channel_; |
116 int route_id_; | 116 int route_id_; |
117 gfx::NativeViewId containing_window_; | 117 gfx::NativeViewId containing_window_; |
118 | 118 |
119 // The url of the main frame hosting the plugin. | 119 // The url of the main frame hosting the plugin. |
120 GURL page_url_; | 120 GURL page_url_; |
121 }; | 121 }; |
122 | 122 |
123 #endif // CHROME_PLUGIN_NPOBJECT_PROXY_H_ | 123 #endif // CHROME_PLUGIN_NPOBJECT_PROXY_H_ |
OLD | NEW |