diff --git a/layout/generic/nsObjectFrame.cpp b/layout/generic/nsObjectFrame.cpp index 213689e5edfe..cf7583249518 100644 --- a/layout/generic/nsObjectFrame.cpp +++ b/layout/generic/nsObjectFrame.cpp @@ -1852,7 +1852,7 @@ static const char* GetMIMEType(nsIPluginInstance *aPluginInstance) { if (aPluginInstance) { - nsMIMEType mime = NULL; + char* mime = nsnull; if (NS_SUCCEEDED(aPluginInstance->GetMIMEType(&mime)) && mime) return mime; } diff --git a/modules/plugin/base/public/nsIPluginInstance.idl b/modules/plugin/base/public/nsIPluginInstance.idl index 714edd4fdf1f..3639f169188f 100644 --- a/modules/plugin/base/public/nsIPluginInstance.idl +++ b/modules/plugin/base/public/nsIPluginInstance.idl @@ -63,7 +63,7 @@ interface nsIPluginInstance : nsISupports * @param aMime - the mime type for the instance * @result - NS_OK if this operation was successful */ - void initialize(in nsIPluginInstanceOwner aOwner, in nsMIMEType aMIMEType); + void initialize(in nsIPluginInstanceOwner aOwner, in string aMIMEType); /** * Called to instruct the plugin instance to start. This will be @@ -120,7 +120,7 @@ interface nsIPluginInstance : nsISupports * @param aResult - the resulting output stream * @result - NS_OK if this operation was successful */ - void newStreamFromPlugin(in nsMIMEType aType, in string aTarget, out nsIOutputStream aResult); + void newStreamFromPlugin(in string aType, in string aTarget, out nsIOutputStream aResult); /** * Called to instruct the plugin instance to print itself to a printer. @@ -181,7 +181,7 @@ interface nsIPluginInstance : nsISupports * @param aMIMEType - resulting MIME type * @result - NS_OK if this operation was successful */ - readonly attribute nsMIMEType MIMEType; + readonly attribute string MIMEType; /** * Get the JavaScript context to this plugin instance. diff --git a/modules/plugin/base/public/nsIPluginStreamInfo.idl b/modules/plugin/base/public/nsIPluginStreamInfo.idl index b01d73b4d53e..aeac19608a91 100644 --- a/modules/plugin/base/public/nsIPluginStreamInfo.idl +++ b/modules/plugin/base/public/nsIPluginStreamInfo.idl @@ -55,7 +55,7 @@ [uuid(ed7d4ca0-b005-11d2-adaa-00805f6dec49)] interface nsIPluginStreamInfo : nsISupports { - readonly attribute nsMIMEType contentType; + readonly attribute string contentType; void isSeekable(out boolean aSeekable); diff --git a/modules/plugin/base/public/nsplugindefs.h b/modules/plugin/base/public/nsplugindefs.h index 0b5a201b434e..00ffc4930e34 100644 --- a/modules/plugin/base/public/nsplugindefs.h +++ b/modules/plugin/base/public/nsplugindefs.h @@ -114,8 +114,6 @@ RCDATA NS_INFO_ProductName { "NPAVI32 Dynamic Link Library\0" } //////////////////////////////////////////////////////////////////////////////// // Structures and definitions -typedef const char* nsMIMEType; - struct nsByteRange { PRInt32 offset; /* negative offset means from the end */ PRUint32 length; diff --git a/modules/plugin/base/public/nspluginroot.idl b/modules/plugin/base/public/nspluginroot.idl index 5300dc6abb44..d279b64ef891 100644 --- a/modules/plugin/base/public/nspluginroot.idl +++ b/modules/plugin/base/public/nspluginroot.idl @@ -47,7 +47,6 @@ native nativeChar(const char * *); native nsPluginMode(nsPluginMode); native nsPluginStreamType(nsPluginStreamType); -native nsMIMEType(nsMIMEType); native nsPluginWindow(nsPluginWindow); [ptr] native nsPluginWindowPtr(nsPluginWindow); [ref] native nsPluginWindowStarRef(nsPluginWindow *); diff --git a/modules/plugin/base/src/nsNPAPIPluginInstance.cpp b/modules/plugin/base/src/nsNPAPIPluginInstance.cpp index 17145087264c..31bc2efc9b8c 100644 --- a/modules/plugin/base/src/nsNPAPIPluginInstance.cpp +++ b/modules/plugin/base/src/nsNPAPIPluginInstance.cpp @@ -338,7 +338,7 @@ nsNPAPIPluginStreamListener::OnStartBinding(nsIPluginStreamInfo* pluginInfo) return NS_ERROR_FAILURE; PRBool seekable; - nsMIMEType contentType; + char* contentType; PRUint16 streamType = NP_NORMAL; NPError error; @@ -921,17 +921,17 @@ nsNPAPIPluginInstance::IsStarted(void) return mStarted; } -NS_IMETHODIMP nsNPAPIPluginInstance::Initialize(nsIPluginInstanceOwner* aOwner, const nsMIMEType aMIMEType) +NS_IMETHODIMP nsNPAPIPluginInstance::Initialize(nsIPluginInstanceOwner* aOwner, const char* aMIMEType) { PLUGIN_LOG(PLUGIN_LOG_NORMAL, ("nsNPAPIPluginInstance::Initialize this=%p\n",this)); mOwner = aOwner; if (aMIMEType) { - mMIMEType = (nsMIMEType)PR_Malloc(PL_strlen(aMIMEType) + 1); + mMIMEType = (char*)PR_Malloc(PL_strlen(aMIMEType) + 1); if (mMIMEType) - PL_strcpy((char *)mMIMEType, aMIMEType); + PL_strcpy(mMIMEType, aMIMEType); } return InitializePlugin(); @@ -1123,7 +1123,7 @@ nsNPAPIPluginInstance::InitializePlugin() // backward compatible... nsPluginMode mode; - nsMIMEType mimetype; + char* mimetype; NPError error; GetMode(&mode); @@ -1258,7 +1258,7 @@ nsNPAPIPluginInstance::NewStreamToPlugin(nsIPluginStreamListener** listener) } NS_IMETHODIMP -nsNPAPIPluginInstance::NewStreamFromPlugin(nsMIMEType type, const char* target, +nsNPAPIPluginInstance::NewStreamFromPlugin(const char* type, const char* target, nsIOutputStream* *result) { nsPluginStreamToFile* stream = new nsPluginStreamToFile(target, mOwner); @@ -1783,7 +1783,7 @@ nsNPAPIPluginInstance::ForceRedraw() } NS_IMETHODIMP -nsNPAPIPluginInstance::GetMIMEType(nsMIMEType *result) +nsNPAPIPluginInstance::GetMIMEType(char* *result) { if (!mMIMEType) *result = ""; diff --git a/modules/plugin/base/src/nsNPAPIPluginInstance.h b/modules/plugin/base/src/nsNPAPIPluginInstance.h index e6e3a48710ce..73d9d5e3695e 100644 --- a/modules/plugin/base/src/nsNPAPIPluginInstance.h +++ b/modules/plugin/base/src/nsNPAPIPluginInstance.h @@ -164,7 +164,7 @@ public: private: nsTArray mPopupStates; - nsMIMEType mMIMEType; + char* mMIMEType; // Weak pointer to the owner. The owner nulls this out (by calling // InvalidateOwner()) when it's no longer our owner. diff --git a/modules/plugin/base/src/nsPluginHost.cpp b/modules/plugin/base/src/nsPluginHost.cpp index 8634f09f6a84..8498ede3db54 100644 --- a/modules/plugin/base/src/nsPluginHost.cpp +++ b/modules/plugin/base/src/nsPluginHost.cpp @@ -531,7 +531,7 @@ nsPluginInstanceTag * nsPluginInstanceTagList::find(const char * mimetype) if (!p->mInstance) continue; - nsMIMEType mt; + char* mt; nsresult rv = p->mInstance->GetMIMEType(&mt); if (NS_FAILED(rv)) continue; @@ -1101,7 +1101,7 @@ public: // nsINPAPIPluginStreamInfo interface NS_IMETHOD - GetContentType(nsMIMEType* result); + GetContentType(char **result); NS_IMETHOD IsSeekable(PRBool* result); @@ -1127,7 +1127,7 @@ public: // local methods void - SetContentType(const nsMIMEType contentType); + SetContentType(const char* contentType); void SetSeekable(const PRBool seekable); @@ -1293,7 +1293,7 @@ NS_IMPL_ISUPPORTS2(nsPluginStreamInfo, nsIPluginStreamInfo, nsINPAPIPluginStreamInfo) NS_IMETHODIMP -nsPluginStreamInfo::GetContentType(nsMIMEType* result) +nsPluginStreamInfo::GetContentType(char **result) { *result = mContentType; return NS_OK; @@ -1450,7 +1450,7 @@ nsPluginStreamInfo::SetStreamOffset(PRInt32 offset) } void -nsPluginStreamInfo::SetContentType(const nsMIMEType contentType) +nsPluginStreamInfo::SetContentType(const char* contentType) { if (mContentType != nsnull) PL_strfree(mContentType); diff --git a/modules/plugin/base/src/nsPluginNativeWindowOS2.cpp b/modules/plugin/base/src/nsPluginNativeWindowOS2.cpp index 1393d7f07f4f..568673570bfd 100644 --- a/modules/plugin/base/src/nsPluginNativeWindowOS2.cpp +++ b/modules/plugin/base/src/nsPluginNativeWindowOS2.cpp @@ -178,7 +178,7 @@ MRESULT EXPENTRY PluginWndProc(HWND hWnd, ULONG msg, MPARAM mp1, MPARAM mp2) nsCOMPtr inst; win->GetPluginInstance(inst); if (inst) { - nsMIMEType mimetype = nsnull; + char* mimetype = nsnull; inst->GetMIMEType(&mimetype); if (mimetype) { if (!strcmp(mimetype, "application/x-shockwave-flash")) diff --git a/modules/plugin/base/src/nsPluginNativeWindowWin.cpp b/modules/plugin/base/src/nsPluginNativeWindowWin.cpp index a08056a67bf1..7b7b69910c3c 100644 --- a/modules/plugin/base/src/nsPluginNativeWindowWin.cpp +++ b/modules/plugin/base/src/nsPluginNativeWindowWin.cpp @@ -225,7 +225,7 @@ static LRESULT CALLBACK PluginWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM // Flash will need special treatment later if (win->mPluginType == nsPluginType_Unknown) { if (inst) { - nsMIMEType mimetype = nsnull; + char* mimetype = nsnull; inst->GetMIMEType(&mimetype); if (mimetype) { if (!strcmp(mimetype, "application/x-shockwave-flash"))