Chromium Code Reviews| Index: chrome/browser/resources/omnibox_result.js |
| diff --git a/chrome/browser/resources/omnibox_result.js b/chrome/browser/resources/omnibox_result.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..cff0f2bf7a1d32d5367ff8c643a40a9fe98b78a6 |
| --- /dev/null |
| +++ b/chrome/browser/resources/omnibox_result.js |
| @@ -0,0 +1,20 @@ |
| +/** |
| + * @fileoverview Click handler for omnibox results. |
| + */ |
| + |
| +/** |
| + * The origin of the embedding page. |
| + * Must be in double quotes for proper escaping. |
| + * @type {string} |
| + * @const |
| + */ |
| +var EMBEDDER_ORIGIN = "%s"; |
| + |
| +function handleClick(event) { |
| + var clickMessage = {'click': event.button}; |
| + top.postMessage(clickMessage, EMBEDDER_ORIGIN); |
| +} |
| + |
| +document.addEventListener('DOMContentLoaded', function() { |
| + window.addEventListener('click', handleClick, false); |
|
samarth
2013/04/02 23:26:58
Strictly speaking you shouldn't need to wait for D
Jered
2013/04/03 18:49:33
Ack.
|
| +}); |