summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
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 */)