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..9816cfc7047cebaf62640c6cba3b829dcddfc01e |
| --- /dev/null |
| +++ b/chrome/browser/resources/omnibox_result.js |
| @@ -0,0 +1,23 @@ |
| +// Copyright 2013 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 Click handler for omnibox results. |
| + */ |
| + |
| +(function() { |
| +/** |
| + * The origin of the embedding page. |
| + * This string literal must be in double quotes for proper escaping. |
| + * @type {string} |
| + * @const |
| + */ |
| +var EMBEDDER_ORIGIN = "%s"; |
| + |
| +function handleClick(event) { |
| + top.postMessage({'click': event.button}, EMBEDDER_ORIGIN); |
| +} |
| + |
| +window.addEventListener('click', handleClick, false); |
|
Dan Beam
2013/04/06 00:18:13
you could probably just inline if you'd like
wind
Jered
2013/04/06 02:45:16
Done.
|
| +})(); |