| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @fileoverview Bridge that sends Braille messages from content scripts or | 6 * @fileoverview Bridge that sends Braille messages from content scripts or |
| 7 * other pages to the main background page. | 7 * other pages to the main background page. |
| 8 * | 8 * |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 65 |
| 66 var message = {'target': 'BRAILLE', | 66 var message = {'target': 'BRAILLE', |
| 67 'action': 'write', | 67 'action': 'write', |
| 68 'params': outParams, | 68 'params': outParams, |
| 69 'contentId' : this.lastContentId_}; | 69 'contentId' : this.lastContentId_}; |
| 70 | 70 |
| 71 cvox.ExtensionBridge.send(message); | 71 cvox.ExtensionBridge.send(message); |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 | 74 |
| 75 /** @override */ |
| 76 cvox.ChromeBraille.prototype.writeRawImage = function(imageDataUrl) { |
| 77 // Do Nothing. |
| 78 }; |
| 79 |
| 80 |
| 81 /** @override */ |
| 82 cvox.ChromeBraille.prototype.getDisplayState = function() { |
| 83 return {available: false, textRowCount: 0, textColumnCount: 0}; |
| 84 }; |
| 85 |
| 86 |
| 75 /** @private */ | 87 /** @private */ |
| 76 cvox.ChromeBraille.prototype.updateLastContentId_ = function() { | 88 cvox.ChromeBraille.prototype.updateLastContentId_ = function() { |
| 77 this.lastContentId_ = cvox.ExtensionBridge.uniqueId() + '.' + | 89 this.lastContentId_ = cvox.ExtensionBridge.uniqueId() + '.' + |
| 78 this.nextLocalId_++; | 90 this.nextLocalId_++; |
| 79 }; | 91 }; |
| 80 | 92 |
| 81 | 93 |
| 82 /** | 94 /** |
| 83 * Dispatches braille input commands. | 95 * Dispatches braille input commands. |
| 84 * @param {!cvox.BrailleKeyEvent} brailleEvt The braille key event. | 96 * @param {!cvox.BrailleKeyEvent} brailleEvt The braille key event. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 101 * Overrides the key event handler | 113 * Overrides the key event handler |
| 102 * @param {function(!cvox.BrailleKeyEvent, cvox.NavBraille):void} listener | 114 * @param {function(!cvox.BrailleKeyEvent, cvox.NavBraille):void} listener |
| 103 */ | 115 */ |
| 104 cvox.ChromeBraille.prototype.setKeyEventHandlerForTest = function(listener) { | 116 cvox.ChromeBraille.prototype.setKeyEventHandlerForTest = function(listener) { |
| 105 this.onKeyEvent_ = listener; | 117 this.onKeyEvent_ = listener; |
| 106 }; | 118 }; |
| 107 | 119 |
| 108 | 120 |
| 109 /** Export platform constructor. */ | 121 /** Export platform constructor. */ |
| 110 cvox.HostFactory.brailleConstructor = cvox.ChromeBraille; | 122 cvox.HostFactory.brailleConstructor = cvox.ChromeBraille; |
| OLD | NEW |