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

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

Issue 12081002: about:omnibox - add "in keyword mode" checkbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: forth -> fourth Created 7 years, 10 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
« no previous file with comments | « chrome/browser/resources/omnibox/omnibox.html ('k') | chrome/browser/ui/webui/omnibox/omnibox_ui_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/omnibox/omnibox.js
diff --git a/chrome/browser/resources/omnibox/omnibox.js b/chrome/browser/resources/omnibox/omnibox.js
index 5313a41374aa1a805df2613e8c6a49054b4133e6..fb0137cdc81d6adf4e80c07a3852b9d7d1ca74b6 100644
--- a/chrome/browser/resources/omnibox/omnibox.js
+++ b/chrome/browser/resources/omnibox/omnibox.js
@@ -27,6 +27,7 @@ cr.define('omniboxDebug', function() {
'submit', startOmniboxQuery, false);
$('prevent-inline-autocomplete').addEventListener(
'change', startOmniboxQuery);
+ $('prefer-keyword').addEventListener('change', startOmniboxQuery);
$('show-details').addEventListener('change', refresh);
$('show-incomplete-results').addEventListener('change', refresh);
$('show-all-providers').addEventListener('change', refresh);
@@ -56,15 +57,17 @@ cr.define('omniboxDebug', function() {
function startOmniboxQuery(event) {
// First, clear the results of past calls (if any).
progressiveAutocompleteResults = [];
- // Then, call chrome with a three-element list:
+ // Then, call chrome with a four-element list:
// - first element: the value in the text box
- // - second element: the value of prevent-inline-autocomplete
- // - third element: the location of the cursor in the text box
+ // - second element: the location of the cursor in the text box
+ // - third element: the value of prevent-inline-autocomplete
+ // - forth element: the value of prefer-keyword
cursorPositionUsed = $('input-text').selectionEnd;
chrome.send('startOmniboxQuery', [
$('input-text').value,
+ cursorPositionUsed,
$('prevent-inline-autocomplete').checked,
- cursorPositionUsed]);
+ $('prefer-keyword').checked]);
// Cancel the submit action. i.e., don't submit the form. (We handle
// display the results solely with Javascript.)
event.preventDefault();
« no previous file with comments | « chrome/browser/resources/omnibox/omnibox.html ('k') | chrome/browser/ui/webui/omnibox/omnibox_ui_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698