mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
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:
@ -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;\"> </div>\n"
|
||||
"</body></html>";
|
||||
|
||||
resourceStream =
|
||||
CefStreamReader::CreateForData((void*)html.c_str(), html.size());
|
||||
response->SetMimeType("text/html");
|
||||
response->SetStatus(200);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user