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

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

Issue 2806049: Allow Pepper plugins to make requests with relative urls. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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
« no previous file with comments | « no previous file | chrome/common/pepper_plugin_registry.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 return (url.scheme() == required_url.scheme() && 430 return (url.scheme() == required_url.scheme() &&
431 url.host() == required_url.host()); 431 url.host() == required_url.host());
432 } 432 }
433 433
434 void PluginService::RegisterPepperPlugins() { 434 void PluginService::RegisterPepperPlugins() {
435 std::vector<PepperPluginInfo> plugins; 435 std::vector<PepperPluginInfo> plugins;
436 PepperPluginRegistry::GetList(&plugins); 436 PepperPluginRegistry::GetList(&plugins);
437 for (size_t i = 0; i < plugins.size(); ++i) { 437 for (size_t i = 0; i < plugins.size(); ++i) {
438 NPAPI::PluginVersionInfo info; 438 NPAPI::PluginVersionInfo info;
439 info.path = plugins[i].path; 439 info.path = plugins[i].path;
440 info.product_name = plugins[i].path.BaseName().ToWStringHack(); 440 info.product_name = plugins[i].name.empty() ?
441 plugins[i].path.BaseName().ToWStringHack() :
442 ASCIIToWide(plugins[i].name);
443 info.file_description = ASCIIToWide(plugins[i].description);
444 info.file_extensions = ASCIIToWide(plugins[i].file_extensions);
445 info.file_description = ASCIIToWide(plugins[i].type_descriptions);
441 info.mime_types = ASCIIToWide(JoinString(plugins[i].mime_types, '|')); 446 info.mime_types = ASCIIToWide(JoinString(plugins[i].mime_types, '|'));
442 447
443 // These NPAPI entry points will never be called. TODO(darin): Come up 448 // These NPAPI entry points will never be called. TODO(darin): Come up
444 // with a cleaner way to register pepper plugins with the NPAPI PluginList, 449 // with a cleaner way to register pepper plugins with the NPAPI PluginList,
445 // or perhaps refactor the PluginList to be less specific to NPAPI. 450 // or perhaps refactor the PluginList to be less specific to NPAPI.
446 memset(&info.entry_points, 0, sizeof(info.entry_points)); 451 memset(&info.entry_points, 0, sizeof(info.entry_points));
447 452
448 NPAPI::PluginList::Singleton()->RegisterInternalPlugin(info); 453 NPAPI::PluginList::Singleton()->RegisterInternalPlugin(info);
449 } 454 }
450 } 455 }
OLDNEW
« no previous file with comments | « no previous file | chrome/common/pepper_plugin_registry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698