1 21 22 package org.lobobrowser.html.js; 23 24 import org.lobobrowser.html.*; 25 import org.lobobrowser.js.*; 26 27 public class Navigator extends AbstractScriptableDelegate { 28 private final UserAgentContext context; 29 30 33 public Navigator(UserAgentContext context) { 34 super(); 35 this.context = context; 36 } 37 38 public String getAppCodeName() { 39 return this.context.getAppCodeName(); 40 } 41 42 public String getAppName() { 43 return this.context.getAppName(); 44 } 45 46 public String getAppVersion() { 47 return this.context.getAppVersion(); 48 } 49 50 public String getAppMinorVersion() { 51 return this.context.getAppMinorVersion(); 52 } 53 54 public String getPlatform() { 55 return this.context.getPlatform(); 56 } 57 58 public String getUserAgent() { 59 return this.context.getUserAgent(); 60 } 61 62 public boolean javaEnabled() { 63 return true; 65 } 66 67 private MimeTypesCollection mimeTypes; 68 69 public MimeTypesCollection getMimeTypes() { 70 synchronized(this) { 71 MimeTypesCollection mt = this.mimeTypes; 72 if(mt == null) { 73 mt = new MimeTypesCollection(); 74 this.mimeTypes = mt; 75 } 76 return mt; 77 } 78 } 79 80 public class MimeTypesCollection { 81 public int getLength() { 83 return 0; 84 } 85 86 public Object item(int index) { 87 return null; 88 } 89 90 public Object namedItem(String name) { 91 return null; 92 } 93 } 94 } | Popular Tags |