Searched defs:matchesPlatform (Results 1 - 1 of 1) sorted by relevance

/external/chromium_org/chrome/third_party/chromevox/
H A DchromeVoxChromeOptionsScript.js46 c||(g=b?g+cvox.KeyUtil.getReadableNameForKeyCode(l):g+cvox.KeyUtil.keyCodeToString(l))}-1==d.indexOf(k)&&(g+=k+"+")}d+=g;"+"==d[d.length-1]&&(d=d.slice(0,-1))}a.cvoxModifier||a.prefixKey?d=""!=d?"Cvox+"+d:"Cvox":a.stickyMode&&(">"==d[d.length-1]&&(d=d.slice(0,-1)),d=d+"+"+d);return d};cvox.KeyUtil.isDoubleTapKey=function(a){var b=!1,c=a.doubleTap;a.doubleTap=!0;for(var d=0,e;e=cvox.KeySequence.doubleTapCache[d];d++)if(e.equals(a)){b=!0;break}a.doubleTap=c;return b};cvox.PlatformUtil={};cvox.PlatformFilter={NONE:0,WINDOWS:1,MAC:2,LINUX:4,WML:7,CHROMEOS:8,ANDROID:16};cvox.PlatformUtil.matchesPlatform=function(a){var b=navigator.userAgent;return void 0==a?!0:-1!=b.indexOf("Android")?0!=(a&cvox.PlatformFilter.ANDROID):-1!=b.indexOf("Win")?0!=(a&cvox.PlatformFilter.WINDOWS):-1!=b.indexOf("Mac")?0!=(a&cvox.PlatformFilter.MAC):-1!=b.indexOf("Linux")?0!=(a&cvox.PlatformFilter.LINUX):-1!=b.indexOf("CrOS")?0!=(a&cvox.PlatformFilter.CHROMEOS):!1};cvox.KeyMap=function(a){this.bindings_=a;this.commandToKey_={};this.buildCommandToKey_()};cvox.KeyMap.KEYMAP_PATH="chromevox/background/keymaps/";cvox.KeyMap.AVAILABLE_MAP_INFO={keymap_classic:{file:"classic_keymap.json"},keymap_flat:{file:"flat_keymap.json"},keymap_experimental:{file:"experimental.json"}};cvox.KeyMap.DEFAULT_KEYMAP=0;cvox.KeyMap.prototype.length=function(){return this.bindings_.length};cvox.KeyMap.prototype.keys=function(){return this.bindings_.map(function(a){return a.sequence})};
51 cvox.KeyMap.fromDefaults=function(){return cvox.KeyMap.fromPath(cvox.KeyMap.KEYMAP_PATH+cvox.KeyMap.AVAILABLE_MAP_INFO.keymap_classic.file)};cvox.KeyMap.fromJSON=function(a){try{var b=JSON.parse(a).bindings,b=b.filter(function(a){return void 0===a.sequence.platformFilter||cvox.PlatformUtil.matchesPlatform(a.sequence.platformFilter)})}catch(c){return null}if("object"!=typeof b)return null;for(a=0;a<b.length;a++){if(void 0==b[a].command||void 0==b[a].sequence)return null;b[a].sequence=cvox.KeySequence.deserialize(b[a].sequence)}return new cvox.KeyMap(b)};
761 cvox.NavBraille.prototype.toString=function(){return'NavBraille(text="'+this.text.toString()+'" startIndex="'+this.startIndex+'" endIndex="'+this.endIndex+'")'};cvox.NavBraille.prototype.write=function(){cvox.PlatformUtil.matchesPlatform(cvox.PlatformFilter.CHROMEOS|cvox.PlatformFilter.ANDROID)&&cvox.ChromeVox.braille.write(this)};cvox.BrailleKeyCommand={PAN_LEFT:"pan_left",PAN_RIGHT:"pan_right",LINE_UP:"line_up",LINE_DOWN:"line_down",TOP:"top",BOTTOM:"bottom",ROUTING:"routing",SECONDARY_ROUTING:"secondary_routing",DOTS:"dots",STANDARD_KEY:"standard_key"};cvox.BrailleKeyEvent={};cvox.BrailleInterface=function(){};cvox.BrailleInterface.prototype.write=function(){};cvox.BrailleInterface.prototype.setCommandListener=function(){};cvox.AbstractBraille=function(){};cvox.braille={};cvox.braille.LibLouisNativeClient=function(a,b){this.nmfPath_=a;this.tablesDir_=goog.isDef(b)?b:null;this.embedElement_=null;this.instanceState_=cvox.braille.LibLouisNativeClient.InstanceState.NOT_LOADED;this.pendingTranslators_=[];this.pendingRpcCallbacks_={};this.nextMessageId_=1};cvox.braille.LibLouisNativeClient.InstanceState={NOT_LOADED:0,LOADING:1,LOADED:2,ERROR:-1};
1272 cvox.NavigationManager.prototype.getBraille=function(){return cvox.PlatformUtil.matchesPlatform(cvox.PlatformFilter.ANDROID|cvox.PlatformFilter.CHROMEOS)?this.shifter_.getBraille(this.prevSel_,this.curSel_):new cvox.NavBraille({})};
1340 cvox.ChromeVoxUserCommands.dispatchCommand_=function(a){if(cvox.Widget.isActive()||!cvox.PlatformUtil.matchesPlatform(a.platformFilter)||a.skipInput&&cvox.FocusUtil.isFocusInTextInputField())return!0;if(cvox.ChromeVoxUserCommands.enableCommandDispatchingToPage&&-1!=cvox.UserEventDetail.JUMP_COMMANDS.indexOf(a.command)){a=new cvox.UserEventDetail({command:a.command});a=a.createEventObject();var b=cvox.ChromeVox.navigationManager.getCurrentNode();b||(b=document.body);b.dispatchEvent(a);return!1}return cvox.ChromeVoxUserCommands.doCommand_(a)};
1341 cvox.ChromeVoxUserCommands.doCommand_=function(a){if(cvox.Widget.isActive()||!cvox.PlatformUtil.matchesPlatform(a.platformFilter)||a.skipInput&&cvox.FocusUtil.isFocusInTextInputField()||a.disallowOOBE&&document.URL.match(/^chrome:\/\/oobe/i))return!0;var b=a.command;a.allowEvents||cvox.ChromeVoxEventSuspender.enterSuspendEvents();a.disallowContinuation&&cvox.ChromeVox.navigationManager.stopReading(!0);a.forward?cvox.ChromeVox.navigationManager.setReversed(!1):a.backward&&cvox.ChromeVox.navigationManager.setReversed(!0);
1399 cvox.ChromeVoxEventWatcher.mouseClickEventWatcher=function(a){cvox.PlatformUtil.matchesPlatform(cvox.PlatformFilter.WML)&&!a.fromCvox&&cvox.ApiImplementation.syncToNode(a.target,!0);return cvox.ChromeVox.host.mustRedispatchClickEvent()&&!a.fromCvox?(cvox.ChromeVoxUserCommands.wasMouseClicked=!0,a.stopPropagation(),a.preventDefault(),cvox.Focuser.setFocus(cvox.ChromeVox.navigationManager.getCurrentNode()),cvox.ChromeVox.tts.speak(cvox.ChromeVox.msgs.getMsg("element_clicked"),cvox.AbstractTts.QUEUE_MODE_FLUSH,
1494 cvox.OptionsPage.eventListener,!1);document.addEventListener("click",cvox.OptionsPage.eventListener,!1);document.addEventListener("keydown",cvox.OptionsPage.eventListener,!1);cvox.ExtensionBridge.addMessageListener(function(a){(a.keyBindings||a.prefs)&&cvox.OptionsPage.update()});document.getElementById("selectKeys").addEventListener("click",cvox.OptionsPage.reset,!1);cvox.PlatformUtil.matchesPlatform(cvox.PlatformFilter.WML)&&(document.getElementById("version").textContent=chrome.app.getDetails().version)};
1499 this.prevTime=b;a.preventDefault();a.stopPropagation()}},cvox.OptionsPage),!0);for(var c=cvox.CommandStore.categories(),d=0;d<c.length;d++)if("braille"!=c[d]){var e=document.createElement("h3");e.className="i18n";e.setAttribute("msgid",c[d]);e.id=c[d];a.appendChild(e);for(var f=cvox.CommandStore.commandsForCategory(c[d]),g=0;g<f.length;g++){var h=f[g],k=b.keyForCommand(h)[0];if("toggleChromeVox"!=h||!cvox.PlatformUtil.matchesPlatform(cvox.PlatformFilter.CHROMEOS)){e=document.createElement("input");

Completed in 132 milliseconds