summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorjcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-04 00:43:15 +0000
committerjcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-04 00:43:15 +0000
commit0b537a44c49a3ce217d7e21befd84224d089d588 (patch)
treed674da2bfd5189f1b23fe359dd760e9188ba7299 /chrome/common
parentbb837f9287259862c94155cc59cfc9e1bdfe1258 (diff)
downloadchromium_src-0b537a44c49a3ce217d7e21befd84224d089d588.zip
chromium_src-0b537a44c49a3ce217d7e21befd84224d089d588.tar.gz
chromium_src-0b537a44c49a3ce217d7e21befd84224d089d588.tar.bz2
Revert 76840 - Removed GPU plugin.
Pepper 3D v2 does not use the GPU plugin. It is integrated with the accelerated compositor. TEST=PPAPI 3D v2 still works, trybots BUG=none Review URL: http://codereview.chromium.org/6588090 TBR=apatrick@chromium.org Review URL: http://codereview.chromium.org/6614030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76845 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/gpu_plugin.cc36
-rw-r--r--chrome/common/gpu_plugin.h16
-rw-r--r--chrome/common/plugin_messages_internal.h5
3 files changed, 57 insertions, 0 deletions
diff --git a/chrome/common/gpu_plugin.cc b/chrome/common/gpu_plugin.cc
new file mode 100644
index 0000000..fd4c680
--- /dev/null
+++ b/chrome/common/gpu_plugin.cc
@@ -0,0 +1,36 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/common/gpu_plugin.h"
+
+#include "base/command_line.h"
+#include "base/string_util.h"
+#include "base/utf_string_conversions.h"
+#include "chrome/common/chrome_switches.h"
+#include "gpu/gpu_plugin/gpu_plugin.h"
+#include "webkit/plugins/npapi/plugin_list.h"
+
+namespace chrome {
+
+void RegisterInternalGPUPlugin() {
+#if defined(ENABLE_GPU)
+ const webkit::npapi::PluginEntryPoints entry_points = {
+#if !defined(OS_POSIX) || defined(OS_MACOSX)
+ gpu_plugin::NP_GetEntryPoints,
+#endif
+ gpu_plugin::NP_Initialize,
+ gpu_plugin::NP_Shutdown
+ };
+
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableGPUPlugin))
+ webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin(
+ FilePath(FILE_PATH_LITERAL("gpu-plugin")),
+ "GPU Plug-in",
+ "GPU Rendering Plug-in",
+ "application/vnd.google.chrome.gpu-plugin",
+ entry_points);
+#endif // ENABLE_GPU
+}
+
+} // namespace chrome
diff --git a/chrome/common/gpu_plugin.h b/chrome/common/gpu_plugin.h
new file mode 100644
index 0000000..938cbc2e
--- /dev/null
+++ b/chrome/common/gpu_plugin.h
@@ -0,0 +1,16 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_COMMON_GPU_PLUGIN_H_
+#define CHROME_COMMON_GPU_PLUGIN_H_
+#pragma once
+
+namespace chrome {
+
+// Register the GPU plugin as an internal plugin in the PluginList.
+void RegisterInternalGPUPlugin();
+
+} // namespace chrome
+
+#endif // CHROME_COMMON_GPU_PLUGIN_H_
diff --git a/chrome/common/plugin_messages_internal.h b/chrome/common/plugin_messages_internal.h
index dec7a89..98ed543 100644
--- a/chrome/common/plugin_messages_internal.h
+++ b/chrome/common/plugin_messages_internal.h
@@ -285,6 +285,11 @@ IPC_MESSAGE_ROUTED2(PluginMsg_HTTPRangeRequestReply,
unsigned long /* resource_id */,
int /* range_request_id */)
+IPC_SYNC_MESSAGE_ROUTED0_1(PluginMsg_CreateCommandBuffer,
+ int /* route_id */)
+
+IPC_MESSAGE_ROUTED0(PluginMsg_DestroyCommandBuffer)
+
IPC_MESSAGE_CONTROL1(PluginMsg_SignalModalDialogEvent,
gfx::NativeViewId /* containing_window */)