| 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 // Helper functions that are used by the NPObject proxy and stub. | 5 // Helper functions that are used by the NPObject proxy and stub. |
| 6 | 6 |
| 7 #ifndef CHROME_PLUGIN_NPOBJECT_UTIL_H__ | 7 #ifndef CHROME_PLUGIN_NPOBJECT_UTIL_H__ |
| 8 #define CHROME_PLUGIN_NPOBJECT_UTIL_H__ | 8 #define CHROME_PLUGIN_NPOBJECT_UTIL_H__ |
| 9 | 9 |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 NPIdentifier CreateNPIdentifier(const NPIdentifier_Param& param); | 41 NPIdentifier CreateNPIdentifier(const NPIdentifier_Param& param); |
| 42 | 42 |
| 43 // Creates an object similar to NPVariant that can be marshalled. | 43 // Creates an object similar to NPVariant that can be marshalled. |
| 44 // If the containing NPObject happens to be an NPObject, then a stub | 44 // If the containing NPObject happens to be an NPObject, then a stub |
| 45 // is created around it and param holds the routing id for it. | 45 // is created around it and param holds the routing id for it. |
| 46 // If release is true, the NPVariant object is released (except if | 46 // If release is true, the NPVariant object is released (except if |
| 47 // it contains an NPObject, since the stub will manage its lifetime). | 47 // it contains an NPObject, since the stub will manage its lifetime). |
| 48 void CreateNPVariantParam(const NPVariant& variant, | 48 void CreateNPVariantParam(const NPVariant& variant, |
| 49 PluginChannelBase* channel, | 49 PluginChannelBase* channel, |
| 50 NPVariant_Param* param, | 50 NPVariant_Param* param, |
| 51 bool release); | 51 bool release, |
| 52 base::WaitableEvent* modal_dialog_event); |
| 52 | 53 |
| 53 #if defined(OS_WIN) | 54 #if defined(OS_WIN) |
| 54 // Creates an NPVariant from the marshalled object. | 55 // Creates an NPVariant from the marshalled object. |
| 55 void CreateNPVariant(const NPVariant_Param& param, | 56 void CreateNPVariant(const NPVariant_Param& param, |
| 56 PluginChannelBase* channel, | 57 PluginChannelBase* channel, |
| 57 NPVariant* result, | 58 NPVariant* result, |
| 58 base::WaitableEvent* modal_dialog_event); | 59 base::WaitableEvent* modal_dialog_event); |
| 59 | 60 |
| 60 // Given a plugin's HWND, returns an event associated with the WebContents | 61 // Given a plugin's HWND, returns an event associated with the WebContents |
| 61 // that's set when inside a messagebox. This tells the plugin process that | 62 // that's set when inside a messagebox. This tells the plugin process that |
| 62 // the message queue should be pumped (as what would happen if everything was | 63 // the message queue should be pumped (as what would happen if everything was |
| 63 // in-process). This avoids deadlocks when a plugin invokes javascript that | 64 // in-process). This avoids deadlocks when a plugin invokes javascript that |
| 64 // causes a message box to come up. | 65 // causes a message box to come up. |
| 65 HANDLE GetMessageBoxEvent(HWND hwnd); | 66 HANDLE GetMessageBoxEvent(HWND hwnd); |
| 66 #endif // defined(OS_WIN) | 67 #endif // defined(OS_WIN) |
| 67 | 68 |
| 68 #endif // CHROME_PLUGIN_NPOBJECT_UTIL_H__ | 69 #endif // CHROME_PLUGIN_NPOBJECT_UTIL_H__ |
| 69 | 70 |
| OLD | NEW |