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

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

Issue 5996003: Revert "Revert 69755 - Move the NPAPI files from webkit/glue/plugins to webkit/plugins/npapi" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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 | « chrome/plugin/npobject_stub.cc ('k') | chrome/plugin/plugin_channel.cc » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "chrome/common/plugin_messages.h" 8 #include "chrome/common/plugin_messages.h"
9 #include "chrome/plugin/npobject_proxy.h" 9 #include "chrome/plugin/npobject_proxy.h"
10 #include "chrome/plugin/plugin_channel_base.h" 10 #include "chrome/plugin/plugin_channel_base.h"
11 #include "third_party/npapi/bindings/nphostapi.h" 11 #include "third_party/npapi/bindings/nphostapi.h"
12 #include "third_party/WebKit/WebKit/chromium/public/WebBindings.h" 12 #include "third_party/WebKit/WebKit/chromium/public/WebBindings.h"
13 #include "webkit/glue/plugins/plugin_host.h" 13 #include "webkit/plugins/npapi/plugin_host.h"
14 #include "webkit/glue/webkit_glue.h" 14 #include "webkit/glue/webkit_glue.h"
15 15
16 using WebKit::WebBindings; 16 using WebKit::WebBindings;
17 17
18 // 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
19 // process. 19 // process.
20 static bool g_plugin_process; 20 static bool g_plugin_process;
21 21
22 namespace { 22 namespace {
23 // The next 7 functions are called by the plugin code when it's using the 23 // The next 7 functions are called by the plugin code when it's using the
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 init = true; 123 init = true;
124 return &host_funcs; 124 return &host_funcs;
125 } 125 }
126 126
127 } 127 }
128 128
129 void PatchNPNFunctions() { 129 void PatchNPNFunctions() {
130 g_plugin_process = true; 130 g_plugin_process = true;
131 NPNetscapeFuncs* funcs = GetHostFunctions(); 131 NPNetscapeFuncs* funcs = GetHostFunctions();
132 NPAPI::PluginHost::Singleton()->PatchNPNetscapeFuncs(funcs); 132 webkit::npapi::PluginHost::Singleton()->PatchNPNetscapeFuncs(funcs);
133 } 133 }
134 134
135 bool IsPluginProcess() { 135 bool IsPluginProcess() {
136 return g_plugin_process; 136 return g_plugin_process;
137 } 137 }
138 138
139 void CreateNPIdentifierParam(NPIdentifier id, NPIdentifier_Param* param) { 139 void CreateNPIdentifierParam(NPIdentifier id, NPIdentifier_Param* param) {
140 param->identifier = id; 140 param->identifier = id;
141 } 141 }
142 142
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 result->type = NPVariantType_Object; 264 result->type = NPVariantType_Object;
265 result->value.objectValue = npobject_base->GetUnderlyingNPObject(); 265 result->value.objectValue = npobject_base->GetUnderlyingNPObject();
266 WebBindings::retainObject(result->value.objectValue); 266 WebBindings::retainObject(result->value.objectValue);
267 break; 267 break;
268 } 268 }
269 default: 269 default:
270 NOTREACHED(); 270 NOTREACHED();
271 } 271 }
272 return true; 272 return true;
273 } 273 }
OLDNEW
« no previous file with comments | « chrome/plugin/npobject_stub.cc ('k') | chrome/plugin/plugin_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698