request for pdf resource from the webui
This commit is contained in:
parent
210f40dd53
commit
c982af991d
10 changed files with 260 additions and 65 deletions
|
@ -53,14 +53,12 @@ AtomWebUIControllerFactory::CreateWebUIControllerForURL(content::WebUI* web_ui,
|
|||
base::SplitStringIntoKeyValuePairs(url.query(), '=', '&', &toplevel_params);
|
||||
std::string stream_id, src;
|
||||
for (const auto& param : toplevel_params) {
|
||||
if (param.first == kPdfViewerUIStreamId) {
|
||||
stream_id = param.second;
|
||||
} else if (param.first == kPdfPluginSrc) {
|
||||
if (param.first == kPdfPluginSrc) {
|
||||
src = param.second;
|
||||
}
|
||||
}
|
||||
auto browser_context = web_ui->GetWebContents()->GetBrowserContext();
|
||||
return new PdfViewerUI(browser_context, web_ui, stream_id, src);
|
||||
return new PdfViewerUI(browser_context, web_ui, src);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue