summaryrefslogtreecommitdiffstats
path: root/webkit/activex_shim
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/activex_shim')
-rw-r--r--webkit/activex_shim/activex_shared.cc13
-rw-r--r--webkit/activex_shim/activex_shared.h4
2 files changed, 17 insertions, 0 deletions
diff --git a/webkit/activex_shim/activex_shared.cc b/webkit/activex_shim/activex_shared.cc
index c5b06a5..649ce01 100644
--- a/webkit/activex_shim/activex_shared.cc
+++ b/webkit/activex_shim/activex_shared.cc
@@ -225,4 +225,17 @@ bool IsMimeTypeActiveX(const std::string& mimetype) {
LowerCaseEqualsASCII(mimetype, "application/oleobject");
}
+bool GetMimeTypeForClsid(const std::string& clsid, std::string* mime_type) {
+ DCHECK(mime_type != NULL);
+
+ if (!base::strcasecmp(clsid.c_str(),
+ "6BF52A52-394A-11D3-B153-00C04F79FAA6") ||
+ !base::strcasecmp(clsid.c_str(),
+ "22D6F312-B0F6-11D0-94AB-0080C74C7E95")) {
+ *mime_type = "application/x-mplayer2";
+ return true;
+ }
+ return false;
+}
+
} // namespace activex_shim
diff --git a/webkit/activex_shim/activex_shared.h b/webkit/activex_shim/activex_shared.h
index 9b34dc9..062dd8d 100644
--- a/webkit/activex_shim/activex_shared.h
+++ b/webkit/activex_shim/activex_shared.h
@@ -61,6 +61,10 @@ bool IsCodebaseAllowed(const std::string& clsid, const std::string& codebase);
// "application/oleobject"
bool IsMimeTypeActiveX(const std::string& mimetype);
+// Returns the NPAPI mime type for the CLSID passed in. On failure
+// return false
+bool GetMimeTypeForClsid(const std::string& clsid, std::string* mime_type);
+
} // namespace activex_shim
#endif // #ifndef WEBKIT_ACTIVEX_SHIM_ACTIVEX_SHARED_H__