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

Side by Side Diff: chrome/common/pepper_plugin_registry.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 | « chrome/common/pepper_plugin_registry.h ('k') | webkit/glue/plugins/pepper_url_loader.cc » ('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 "chrome/common/pepper_plugin_registry.h" 5 #include "chrome/common/pepper_plugin_registry.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // static 67 // static
68 void PepperPluginRegistry::GetExtraPlugins( 68 void PepperPluginRegistry::GetExtraPlugins(
69 std::vector<PepperPluginInfo>* plugins) { 69 std::vector<PepperPluginInfo>* plugins) {
70 FilePath path; 70 FilePath path;
71 if (PathService::Get(chrome::FILE_PDF_PLUGIN, &path) && 71 if (PathService::Get(chrome::FILE_PDF_PLUGIN, &path) &&
72 file_util::PathExists(path)) { 72 file_util::PathExists(path)) {
73 PepperPluginInfo pdf; 73 PepperPluginInfo pdf;
74 pdf.path = path; 74 pdf.path = path;
75 pdf.name = "Chrome PDF Viewer"; 75 pdf.name = "Chrome PDF Viewer";
76 pdf.mime_types.push_back("application/pdf"); 76 pdf.mime_types.push_back("application/pdf");
77 pdf.file_extensions = "pdf";
78 pdf.type_descriptions = "Portable Document Format";
77 plugins->push_back(pdf); 79 plugins->push_back(pdf);
78 } 80 }
79 } 81 }
80 82
81 // static 83 // static
82 void PepperPluginRegistry::GetInternalPluginInfo( 84 void PepperPluginRegistry::GetInternalPluginInfo(
83 InternalPluginInfoList* plugin_info) { 85 InternalPluginInfoList* plugin_info) {
84 // Currently, to centralize the internal plugin registration logic, we 86 // Currently, to centralize the internal plugin registration logic, we
85 // hardcode the list of plugins, mimetypes, and registration information 87 // hardcode the list of plugins, mimetypes, and registration information
86 // in this function. This is gross, but because the GetList() function is 88 // in this function. This is gross, but because the GetList() function is
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 for (size_t i = 0; i < plugins.size(); ++i) { 142 for (size_t i = 0; i < plugins.size(); ++i) {
141 const FilePath& path = plugins[i].path; 143 const FilePath& path = plugins[i].path;
142 ModuleHandle module = pepper::PluginModule::CreateModule(path); 144 ModuleHandle module = pepper::PluginModule::CreateModule(path);
143 if (!module) { 145 if (!module) {
144 DLOG(ERROR) << "Failed to load pepper module: " << path.value(); 146 DLOG(ERROR) << "Failed to load pepper module: " << path.value();
145 continue; 147 continue;
146 } 148 }
147 modules_[path] = module; 149 modules_[path] = module;
148 } 150 }
149 } 151 }
OLDNEW
« no previous file with comments | « chrome/common/pepper_plugin_registry.h ('k') | webkit/glue/plugins/pepper_url_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698