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

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

Issue 7978009: Split ppapi::PluginList from PepperPluginRegistry so that DRT could load pepper plugins. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 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/ppapi_plugin_info.h ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppapi_plugin_info.cc
===================================================================
--- webkit/plugins/ppapi/ppapi_plugin_info.cc (revision 0)
+++ webkit/plugins/ppapi/ppapi_plugin_info.cc (revision 0)
@@ -0,0 +1,53 @@
+// Copyright (c) 2011 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 "webkit/plugins/ppapi/ppapi_plugin_info.h"
+
+#include "base/string_util.h"
+#include "base/utf_string_conversions.h"
+
+namespace webkit {
+namespace ppapi {
+
+PluginInfo::PluginInfo()
+ : is_internal(false),
+ is_out_of_process(false) {
+}
+
+PluginInfo::~PluginInfo() {
+}
+
+void PepperToWebPluginInfo(const PluginInfo& pepper_info,
+ webkit::WebPluginInfo* web_info) {
+ web_info->type = pepper_info.is_out_of_process ?
+ webkit::WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS :
+ webkit::WebPluginInfo::PLUGIN_TYPE_PEPPER_IN_PROCESS;
+
+ web_info->name = pepper_info.name.empty() ?
+ pepper_info.path.BaseName().LossyDisplayName() :
+ UTF8ToUTF16(pepper_info.name);
+ web_info->path = pepper_info.path;
+ web_info->version = ASCIIToUTF16(pepper_info.version);
+ web_info->desc = ASCIIToUTF16(pepper_info.description);
+ web_info->mime_types = pepper_info.mime_types;
+}
+
+bool WebToPepperPluginInfo(const webkit::WebPluginInfo& web_info,
+ PluginInfo* pepper_info) {
+ if (!webkit::IsPepperPlugin(web_info))
+ return false;
+
+ pepper_info->is_out_of_process =
+ web_info.type == webkit::WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS;
+
+ pepper_info->path = FilePath(web_info.path);
+ pepper_info->name = UTF16ToASCII(web_info.name);
+ pepper_info->description = UTF16ToASCII(web_info.desc);
+ pepper_info->version = UTF16ToASCII(web_info.version);
+ pepper_info->mime_types = web_info.mime_types;
+ return true;
+}
+
+} // namespace ppapi
+} // namespace webkit
Property changes on: webkit\plugins\ppapi\ppapi_plugin_info.cc
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « webkit/plugins/ppapi/ppapi_plugin_info.h ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698