Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(857)

Side by Side Diff: chrome/plugin/npobject_util.cc

Issue 20449: Get something in chrome/plugin/ compiling to make Scons happy. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/plugin/plugin.scons » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "chrome/plugin/npobject_util.h" 5 #include "chrome/plugin/npobject_util.h"
6 6
7 #if defined(OS_WIN)
7 #include "chrome/common/plugin_messages.h" 8 #include "chrome/common/plugin_messages.h"
8 #include "chrome/common/win_util.h" 9 #include "chrome/common/win_util.h"
10 #endif
11
9 #include "chrome/plugin/npobject_proxy.h" 12 #include "chrome/plugin/npobject_proxy.h"
10 #include "chrome/plugin/plugin_channel_base.h" 13 #include "chrome/plugin/plugin_channel_base.h"
11 #include "webkit/glue/plugins/nphostapi.h" 14 #include "webkit/glue/plugins/nphostapi.h"
12 #include "webkit/glue/plugins/plugin_host.h" 15 #include "webkit/glue/plugins/plugin_host.h"
13 #include "webkit/glue/webkit_glue.h" 16 #include "webkit/glue/webkit_glue.h"
14 17
15 // true if the current process is a plugin process, false if it's a renderer 18 // true if the current process is a plugin process, false if it's a renderer
16 // process. 19 // process.
17 static bool g_plugin_process; 20 static bool g_plugin_process;
18 21
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 void PatchNPNFunctions() { 120 void PatchNPNFunctions() {
118 g_plugin_process = true; 121 g_plugin_process = true;
119 NPNetscapeFuncs* funcs = GetHostFunctions(); 122 NPNetscapeFuncs* funcs = GetHostFunctions();
120 NPAPI::PluginHost::Singleton()->PatchNPNetscapeFuncs(funcs); 123 NPAPI::PluginHost::Singleton()->PatchNPNetscapeFuncs(funcs);
121 } 124 }
122 125
123 bool IsPluginProcess() { 126 bool IsPluginProcess() {
124 return g_plugin_process; 127 return g_plugin_process;
125 } 128 }
126 129
130 #if defined(OS_WIN)
127 void CreateNPIdentifierParam(NPIdentifier id, NPIdentifier_Param* param) { 131 void CreateNPIdentifierParam(NPIdentifier id, NPIdentifier_Param* param) {
128 param->identifier = id; 132 param->identifier = id;
129 } 133 }
130 134
131 NPIdentifier CreateNPIdentifier(const NPIdentifier_Param& param) { 135 NPIdentifier CreateNPIdentifier(const NPIdentifier_Param& param) {
132 return param.identifier; 136 return param.identifier;
133 } 137 }
134 138
135 void CreateNPVariantParam(const NPVariant& variant, 139 void CreateNPVariantParam(const NPVariant& variant,
136 PluginChannelBase* channel, 140 PluginChannelBase* channel,
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 break; 240 break;
237 case NPVARIANT_PARAM_OBJECT_POINTER: 241 case NPVARIANT_PARAM_OBJECT_POINTER:
238 result->type = NPVariantType_Object; 242 result->type = NPVariantType_Object;
239 result->value.objectValue = static_cast<NPObject*>(param.npobject_pointer) ; 243 result->value.objectValue = static_cast<NPObject*>(param.npobject_pointer) ;
240 NPN_RetainObject(result->value.objectValue); 244 NPN_RetainObject(result->value.objectValue);
241 break; 245 break;
242 default: 246 default:
243 NOTREACHED(); 247 NOTREACHED();
244 } 248 }
245 } 249 }
246 250 #endif
OLDNEW
« no previous file with comments | « no previous file | chrome/plugin/plugin.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698