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

Side by Side Diff: content/common/npobject_util.cc

Issue 7982026: Add GetPluginPath() to npobject_util to avoid content/plugin/ include from npobject_stub.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix namespace Created 9 years, 3 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/common/npobject_util.h" 5 #include "content/common/npobject_util.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "content/common/np_channel_base.h" 8 #include "content/common/np_channel_base.h"
9 #include "content/common/npobject_proxy.h" 9 #include "content/common/npobject_proxy.h"
10 #include "content/common/plugin_messages.h" 10 #include "content/common/plugin_messages.h"
11 #include "third_party/npapi/bindings/nphostapi.h" 11 #include "third_party/npapi/bindings/nphostapi.h"
12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h"
13 #include "webkit/plugins/npapi/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 otherwise.
19 // process.
20 static bool g_plugin_process; 19 static bool g_plugin_process;
21 20
22 namespace { 21 namespace {
23 // The next 7 functions are called by the plugin code when it's using the 22 // The next 7 functions are called by the plugin code when it's using the
24 // NPObject. Plugins always ignore the functions in NPClass (except allocate 23 // NPObject. Plugins always ignore the functions in NPClass (except allocate
25 // and deallocate), and instead just use the function pointers that were 24 // and deallocate), and instead just use the function pointers that were
26 // passed in NPInitialize. 25 // passed in NPInitialize.
27 // When the renderer interacts with an NPObject from the plugin, it of course 26 // When the renderer interacts with an NPObject from the plugin, it of course
28 // uses the function pointers in its NPClass structure. 27 // uses the function pointers in its NPClass structure.
29 static bool NPN_HasMethodPatch(NPP npp, 28 static bool NPN_HasMethodPatch(NPP npp,
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 result->type = NPVariantType_Object; 279 result->type = NPVariantType_Object;
281 result->value.objectValue = npobject_base->GetUnderlyingNPObject(); 280 result->value.objectValue = npobject_base->GetUnderlyingNPObject();
282 WebBindings::retainObject(result->value.objectValue); 281 WebBindings::retainObject(result->value.objectValue);
283 break; 282 break;
284 } 283 }
285 default: 284 default:
286 NOTREACHED(); 285 NOTREACHED();
287 } 286 }
288 return true; 287 return true;
289 } 288 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698