Add the ability to specify full plugin matching parameters including multiple mime types and file extensions via CefPluginInfo (issue #401).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@352 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2011-11-01 16:04:57 +00:00
parent 1bb1526985
commit 7a4cb9dd20
9 changed files with 158 additions and 20 deletions

View File

@ -99,6 +99,21 @@ bool ClientHandler::OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser,
resourceStream = GetBinaryResourceReader(IDS_TRANSPARENCY);
response->SetMimeType("text/html");
response->SetStatus(200);
} else if(url == "http://tests/plugin") {
std::string html =
"<html><body>\n"
"Client Plugin loaded by Mime Type:<br>\n"
"<embed type=\"application/x-client-plugin\" width=600 height=40>\n"
"<br><br>Client Plugin loaded by File Extension:<br>\n"
"<embed src=\"test.xcp\" width=600 height=40>\n"
// Add some extra space below the plugin to allow scrolling.
"<div style=\"height:1000px;\">&nbsp;</div>\n"
"</body></html>";
resourceStream =
CefStreamReader::CreateForData((void*)html.c_str(), html.size());
response->SetMimeType("text/html");
response->SetStatus(200);
}
return false;