1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- 2 * vim:expandtab:shiftwidth=2:tabstop=2:cin: 3 * This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7 #ifndef nsMIMEInfoUIKit_h_ 8 #define nsMIMEInfoUIKit_h_ 9 10 #include "nsMIMEInfoImpl.h" 11 12 class nsMIMEInfoUIKit final : public nsMIMEInfoImpl 13 { 14 public: nsMIMEInfoUIKit(const nsACString & aMIMEType)15 explicit nsMIMEInfoUIKit(const nsACString& aMIMEType) 16 : nsMIMEInfoImpl(aMIMEType) 17 {} nsMIMEInfoUIKit(const nsACString & aType,HandlerClass aClass)18 nsMIMEInfoUIKit(const nsACString& aType, HandlerClass aClass) 19 : nsMIMEInfoImpl(aType, aClass) 20 {} 21 22 NS_IMETHOD LaunchWithFile(nsIFile* aFile); 23 24 protected: 25 virtual nsresult LoadUriInternal(nsIURI* aURI); 26 #ifdef DEBUG LaunchDefaultWithFile(nsIFile * aFile)27 virtual nsresult LaunchDefaultWithFile(nsIFile* aFile) 28 { 29 NS_NOTREACHED("do not call this method, use LaunchWithFile"); 30 return NS_ERROR_UNEXPECTED; 31 } 32 #endif 33 static nsresult OpenApplicationWithURI(nsIFile* aApplication, 34 const nsCString& aURI); 35 }; 36 37 #endif 38