Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3512)

Unified Diff: chrome/browser/resources/omnibox_result.js

Issue 13375003: Fixing iframe jank in the local omnibox popup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Include missing file. Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.
+});

Powered by Google App Engine
This is Rietveld 408576698