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

Unified Diff: content/child/npapi/plugin_host.cc

Issue 19761007: Move NPAPI implementation out of webkit/plugins/npapi and into content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac 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
Index: content/child/npapi/plugin_host.cc
===================================================================
--- content/child/npapi/plugin_host.cc (revision 0)
+++ content/child/npapi/plugin_host.cc (working copy)
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/plugins/npapi/plugin_host.h"
+#include "content/child/npapi/plugin_host.h"
#include "base/command_line.h"
#include "base/file_util.h"
@@ -13,6 +13,10 @@
#include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
+#include "content/child/npapi/plugin_instance.h"
+#include "content/child/npapi/plugin_lib.h"
+#include "content/child/npapi/plugin_stream_url.h"
+#include "content/child/npapi/webplugin_delegate.h"
#include "net/base/net_util.h"
#include "third_party/WebKit/public/web/WebBindings.h"
#include "third_party/WebKit/public/web/WebKit.h"
@@ -21,10 +25,6 @@
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_surface.h"
#include "webkit/common/user_agent/user_agent.h"
-#include "webkit/plugins/npapi/plugin_instance.h"
-#include "webkit/plugins/npapi/plugin_lib.h"
-#include "webkit/plugins/npapi/plugin_stream_url.h"
-#include "webkit/plugins/npapi/webplugin_delegate.h"
#include "webkit/plugins/webplugininfo.h"
#if defined(OS_MACOSX)
@@ -40,8 +40,7 @@
void* NPN_GetJavaPeer(NPP);
}
-namespace webkit {
-namespace npapi {
+namespace content {
// Finds a PluginInstance from an NPP.
// The caller must take a reference if needed.
@@ -299,15 +298,14 @@
return !err;
}
-} // namespace npapi
-} // namespace webkit
+} // namespace content
extern "C" {
-using webkit::npapi::FindInstance;
-using webkit::npapi::PluginHost;
-using webkit::npapi::PluginInstance;
-using webkit::npapi::WebPlugin;
+using content::FindInstance;
+using content::PluginHost;
+using content::PluginInstance;
+using content::WebPlugin;
// Allocates memory from the host's memory space.
void* NPN_MemAlloc(uint32_t size) {
@@ -791,7 +789,7 @@
case NPNVsupportsInvalidatingCoreAnimationBool:
case NPNVsupportsCoreAnimationBool: {
NPBool* supports_model = reinterpret_cast<NPBool*>(value);
- *supports_model = webkit::npapi::SupportsCoreAnimationPlugins();
+ *supports_model = content::SupportsCoreAnimationPlugins();
rv = NPERR_NO_ERROR;
break;
}
@@ -811,8 +809,7 @@
}
case NPNVsupportsCompositingCoreAnimationPluginsBool: {
NPBool* supports_compositing = reinterpret_cast<NPBool*>(value);
- *supports_compositing =
- webkit::npapi::SupportsCoreAnimationPlugins();
+ *supports_compositing = content::SupportsCoreAnimationPlugins();
rv = NPERR_NO_ERROR;
break;
}
@@ -879,7 +876,7 @@
if (model == NPDrawingModelCoreGraphics ||
((model == NPDrawingModelInvalidatingCoreAnimation ||
model == NPDrawingModelCoreAnimation) &&
- webkit::npapi::SupportsCoreAnimationPlugins())) {
+ content::SupportsCoreAnimationPlugins())) {
plugin->set_drawing_model(static_cast<NPDrawingModel>(model));
return NPERR_NO_ERROR;
}

Powered by Google App Engine
This is Rietveld 408576698