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

Unified Diff: webkit/plugins/ppapi/npapi_glue.cc

Issue 19744007: Create a public API around webkit::ppapi::PluginInstance and use it in chrome. After this, webkit/p… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review comments and undo checkdeps change Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/plugins/ppapi/npapi_glue.h ('k') | webkit/plugins/ppapi/plugin_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/npapi_glue.cc
===================================================================
--- webkit/plugins/ppapi/npapi_glue.cc (revision 213462)
+++ webkit/plugins/ppapi/npapi_glue.cc (working copy)
@@ -8,13 +8,6 @@
#include "base/memory/ref_counted.h"
#include "base/strings/string_util.h"
#include "ppapi/c/pp_var.h"
-#include "webkit/plugins/ppapi/host_array_buffer_var.h"
-#include "webkit/plugins/ppapi/host_globals.h"
-#include "webkit/plugins/ppapi/host_var_tracker.h"
-#include "webkit/plugins/ppapi/npobject_var.h"
-#include "webkit/plugins/ppapi/plugin_module.h"
-#include "webkit/plugins/ppapi/plugin_object.h"
-#include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
#include "third_party/npapi/bindings/npapi.h"
#include "third_party/npapi/bindings/npruntime.h"
#include "third_party/WebKit/public/web/WebBindings.h"
@@ -23,6 +16,13 @@
#include "third_party/WebKit/public/web/WebFrame.h"
#include "third_party/WebKit/public/web/WebPluginContainer.h"
#include "v8/include/v8.h"
+#include "webkit/plugins/ppapi/host_array_buffer_var.h"
+#include "webkit/plugins/ppapi/host_globals.h"
+#include "webkit/plugins/ppapi/host_var_tracker.h"
+#include "webkit/plugins/ppapi/npobject_var.h"
+#include "webkit/plugins/ppapi/plugin_module.h"
+#include "webkit/plugins/ppapi/plugin_object.h"
+#include "webkit/plugins/ppapi/ppapi_plugin_instance_impl.h"
using ppapi::NPObjectVar;
using ppapi::PpapiGlobals;
@@ -39,7 +39,7 @@
const char kInvalidPluginValue[] = "Error: Plugin returned invalid value.";
-PP_Var NPObjectToPPVarImpl(PluginInstance* instance,
+PP_Var NPObjectToPPVarImpl(PluginInstanceImpl* instance,
NPObject* object,
v8::Local<v8::Context> context) {
DCHECK(object);
@@ -122,7 +122,8 @@
return true;
}
-PP_Var NPVariantToPPVar(PluginInstance* instance, const NPVariant* variant) {
+PP_Var NPVariantToPPVar(PluginInstanceImpl* instance,
+ const NPVariant* variant) {
switch (variant->type) {
case NPVariantType_Void:
return PP_MakeUndefined();
@@ -171,7 +172,7 @@
return PP_MakeInt32(int_value);
}
-PP_Var NPObjectToPPVar(PluginInstance* instance, NPObject* object) {
+PP_Var NPObjectToPPVar(PluginInstanceImpl* instance, NPObject* object) {
WebPluginContainer* container = instance->container();
// It's possible that container() is NULL if the plugin has been removed from
// the DOM (but the PluginInstance is not destroyed yet).
@@ -183,7 +184,7 @@
return NPObjectToPPVarImpl(instance, object, context);
}
-PP_Var NPObjectToPPVarForTest(PluginInstance* instance, NPObject* object) {
+PP_Var NPObjectToPPVarForTest(PluginInstanceImpl* instance, NPObject* object) {
v8::Isolate* test_isolate = v8::Isolate::New();
PP_Var result = PP_MakeUndefined();
{
@@ -279,7 +280,7 @@
// PPVarArrayFromNPVariantArray ------------------------------------------------
PPVarArrayFromNPVariantArray::PPVarArrayFromNPVariantArray(
- PluginInstance* instance,
+ PluginInstanceImpl* instance,
size_t size,
const NPVariant* variants)
: size_(size) {
@@ -298,7 +299,8 @@
// PPVarFromNPObject -----------------------------------------------------------
-PPVarFromNPObject::PPVarFromNPObject(PluginInstance* instance, NPObject* object)
+PPVarFromNPObject::PPVarFromNPObject(PluginInstanceImpl* instance,
+ NPObject* object)
: var_(NPObjectToPPVar(instance, object)) {
}
« no previous file with comments | « webkit/plugins/ppapi/npapi_glue.h ('k') | webkit/plugins/ppapi/plugin_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698