michael@0: /* -*- Mode: c++; c-basic-offset: 2; tab-width: 20; indent-tabs-mode: nil; -*- michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef nsMIMEInfoAndroid_h michael@0: #define nsMIMEInfoAndroid_h michael@0: michael@0: #include "nsMIMEInfoImpl.h" michael@0: #include "nsIMutableArray.h" michael@0: #include "nsAndroidHandlerApp.h" michael@0: michael@0: class nsMIMEInfoAndroid MOZ_FINAL : public nsIMIMEInfo michael@0: { michael@0: public: michael@0: static bool michael@0: GetMimeInfoForMimeType(const nsACString& aMimeType, michael@0: nsMIMEInfoAndroid** aMimeInfo); michael@0: static bool michael@0: GetMimeInfoForFileExt(const nsACString& aFileExt, michael@0: nsMIMEInfoAndroid** aMimeInfo); michael@0: michael@0: static nsresult michael@0: GetMimeInfoForURL(const nsACString &aURL, bool *found, michael@0: nsIHandlerInfo **info); michael@0: michael@0: NS_DECL_ISUPPORTS michael@0: NS_DECL_NSIMIMEINFO michael@0: NS_DECL_NSIHANDLERINFO michael@0: michael@0: nsMIMEInfoAndroid(const nsACString& aMIMEType); michael@0: michael@0: protected: michael@0: virtual NS_HIDDEN_(nsresult) LaunchDefaultWithFile(nsIFile* aFile); michael@0: virtual NS_HIDDEN_(nsresult) LoadUriInternal(nsIURI *aURI); michael@0: nsCOMPtr mHandlerApps; michael@0: nsCString mType; michael@0: nsTArray mExtensions; michael@0: bool mAlwaysAsk; michael@0: nsHandlerInfoAction mPrefAction; michael@0: nsString mDescription; michael@0: nsCOMPtr mPrefApp; michael@0: michael@0: class SystemChooser MOZ_FINAL : public nsIHandlerApp { michael@0: public: michael@0: NS_DECL_ISUPPORTS michael@0: NS_DECL_NSIHANDLERAPP michael@0: SystemChooser(nsMIMEInfoAndroid* aOuter): mOuter(aOuter) {}; michael@0: michael@0: private: michael@0: nsMIMEInfoAndroid* mOuter; michael@0: michael@0: }; michael@0: }; michael@0: michael@0: #endif /* nsMIMEInfoAndroid_h */