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

Side by Side Diff: chrome/browser/plugin_service.cc

Issue 6162008: plugins: drop PluginVersionInfo for internal plugins (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more comments Created 9 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include "chrome/browser/plugin_service.h" 7 #include "chrome/browser/plugin_service.h"
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 // service, since we only care about this for extensions. 403 // service, since we only care about this for extensions.
404 const GURL& required_url = it->second; 404 const GURL& required_url = it->second;
405 return (url.scheme() == required_url.scheme() && 405 return (url.scheme() == required_url.scheme() &&
406 url.host() == required_url.host()); 406 url.host() == required_url.host());
407 } 407 }
408 408
409 void PluginService::RegisterPepperPlugins() { 409 void PluginService::RegisterPepperPlugins() {
410 std::vector<PepperPluginInfo> plugins; 410 std::vector<PepperPluginInfo> plugins;
411 PepperPluginRegistry::GetList(&plugins); 411 PepperPluginRegistry::GetList(&plugins);
412 for (size_t i = 0; i < plugins.size(); ++i) { 412 for (size_t i = 0; i < plugins.size(); ++i) {
413 webkit::npapi::PluginVersionInfo info; 413 webkit::npapi::WebPluginInfo info;
414 info.path = plugins[i].path; 414 info.path = plugins[i].path;
415 info.product_name = plugins[i].name.empty() ? 415 info.name = plugins[i].name.empty() ?
416 plugins[i].path.BaseName().ToWStringHack() : 416 WideToUTF16(plugins[i].path.BaseName().ToWStringHack()) :
417 ASCIIToWide(plugins[i].name); 417 ASCIIToUTF16(plugins[i].name);
418 info.file_description = ASCIIToWide(plugins[i].description); 418 info.desc = ASCIIToUTF16(plugins[i].description);
419 info.file_extensions = ASCIIToWide(plugins[i].file_extensions);
420 info.file_description = ASCIIToWide(plugins[i].type_descriptions);
421 info.mime_types = ASCIIToWide(JoinString(plugins[i].mime_types, '|'));
422 419
423 // These NPAPI entry points will never be called. TODO(darin): Come up 420 // TODO(evan): Pepper shouldn't require us to parse strings to get
424 // with a cleaner way to register pepper plugins with the NPAPI PluginList, 421 // the list of mime types out.
425 // or perhaps refactor the PluginList to be less specific to NPAPI. 422 if (!webkit::npapi::PluginList::ParseMimeTypes(
426 memset(&info.entry_points, 0, sizeof(info.entry_points)); 423 JoinString(plugins[i].mime_types, '|'),
424 plugins[i].file_extensions,
425 ASCIIToUTF16(plugins[i].type_descriptions),
426 &info.mime_types)) {
427 LOG(ERROR) << "Error parsing mime types for "
428 << plugins[i].path.ToWStringHack();
429 return;
430 }
427 431
428 webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin(info); 432 webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin(info);
429 } 433 }
430 } 434 }
OLDNEW
« no previous file with comments | « no previous file | webkit/glue/plugins/plugin_list.h » ('j') | webkit/plugins/npapi/plugin_lib_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698