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

Unified Diff: chrome/common/gpu_plugin.cc

Issue 367002: Added Pepper 3D render context that instantiates the GPU plugin.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years 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 | « chrome/common/gpu_plugin.h ('k') | chrome/plugin/command_buffer_stub.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/gpu_plugin.cc
===================================================================
--- chrome/common/gpu_plugin.cc (revision 0)
+++ chrome/common/gpu_plugin.cc (revision 0)
@@ -0,0 +1,43 @@
+// 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 "base/command_line.h"
+#include "base/string_util.h"
+#include "chrome/common/chrome_switches.h"
+#include "chrome/common/gpu_plugin.h"
+#include "gpu/gpu_plugin/gpu_plugin.h"
+#include "webkit/glue/plugins/plugin_list.h"
+
+#if defined(ENABLE_GPU)
+#include "webkit/glue/plugins/plugin_constants_win.h"
+#endif
+
+namespace chrome {
+
+void RegisterInternalGPUPlugin() {
+#if defined(ENABLE_GPU)
+ static const std::wstring kWideMimeType = ASCIIToWide(kGPUPluginMimeType);
+ static const NPAPI::PluginVersionInfo kGPUPluginInfo = {
+ FilePath(FILE_PATH_LITERAL("gpu-plugin")),
+ L"GPU Plug-in",
+ L"GPU Rendering Plug-in",
+ L"1",
+ kWideMimeType.c_str(),
+ L"",
+ L"",
+ {
+#if !defined(OS_LINUX)
+ gpu_plugin::NP_GetEntryPoints,
+#endif
+ gpu_plugin::NP_Initialize,
+ gpu_plugin::NP_Shutdown
+ }
+ };
+
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableGPUPlugin))
+ NPAPI::PluginList::Singleton()->RegisterInternalPlugin(kGPUPluginInfo);
+#endif // ENABLE_GPU
+}
+
+} // namespace chrome
Property changes on: chrome\common\gpu_plugin.cc
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/common/gpu_plugin.h ('k') | chrome/plugin/command_buffer_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698