toolkit/mozapps/plugins/service/PluginFinderService.java

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/toolkit/mozapps/plugins/service/PluginFinderService.java	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,40 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +package org.mozilla.pfs;
    1.10 +
    1.11 +public class PluginFinderService {
    1.12 +
    1.13 +  public org.mozilla.pfs.PluginInfo getPluginInfo(java.lang.String aMimetype, java.lang.String aClientOS, java.lang.String aLocale) {
    1.14 +    org.mozilla.pfs.PluginInfo response = new org.mozilla.pfs.PluginInfo();
    1.15 +    
    1.16 +    if (aMimetype.equals("application/x-shockwave-flash")) {
    1.17 +      response.setPid(1);
    1.18 +      response.setName("Flash Player");
    1.19 +      response.setVersion("7");
    1.20 +      response.setIconUrl("http://goat.austin.ibm.com:8080/flash.gif");
    1.21 +      response.setXPILocation("http://www.nexgenmedia.net/flashlinux/flash-linux.xpi");
    1.22 +      response.setInstallerShowsUI(false);
    1.23 +      response.setManualInstallationURL("");
    1.24 +      response.setLicenseURL("");
    1.25 +    } else if (aMimetype.equals("application/x-mtx")) {
    1.26 +      response.setPid(2);
    1.27 +      response.setName("Viewpoint Media Player");
    1.28 +      response.setVersion("5");
    1.29 +      response.setIconUrl(null);
    1.30 +      response.setXPILocation("http://www.nexgenmedia.net/flashlinux/invalid.xpi");
    1.31 +      response.setInstallerShowsUI(false);
    1.32 +      response.setManualInstallationURL("http://www.viewpoint.com/pub/products/vmp.html");   
    1.33 +      response.setLicenseURL("http://www.viewpoint.com/pub/privacy.html");
    1.34 +    } else {
    1.35 +      response.setPid(-1);
    1.36 +    }
    1.37 +    
    1.38 +    response.setRequestedMimetype(aMimetype);
    1.39 +    return response;
    1.40 +    
    1.41 +  }
    1.42 +}
    1.43 +

mercurial