Index: chrome/browser/resources/chromeos/chromevox2/cvox2/injected/injected.js |
diff --git a/chrome/browser/resources/chromeos/chromevox2/cvox2/injected/injected.js b/chrome/browser/resources/chromeos/chromevox2/cvox2/injected/injected.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2174053ec910c1c6455379e7a68b2d7d3ca13341 |
--- /dev/null |
+++ b/chrome/browser/resources/chromeos/chromevox2/cvox2/injected/injected.js |
@@ -0,0 +1,19 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+/** |
+ * @fileoverview The entry point for all ChromeVox2 related code for the |
+ * injected content script. |
+ * This script will temporarily forward any events we need during the |
+ * ChromeVox/ChromeVox2 timeframe where extension APIs do not exist (e.g. |
+ * keyboard events). |
+ */ |
+ |
+/** namespace */ |
+var cvox2 = function() {}; |
+ |
+var port = chrome.extension.connect({name: 'chromevox2'}); |
+document.body.addEventListener('keydown', function(evt) { |
+ port.postMessage({keydown: evt.keyCode}); |
+}, true); |