Chromium Code Reviews| Index: chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js |
| diff --git a/chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js b/chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js |
| index 19c40b70ec99bdb495110d63a2cf599b6afbe95e..da2bb99fbbea7e5ca7e94dab48a35f36de293e29 100644 |
| --- a/chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js |
| +++ b/chrome/browser/resources/local_omnibox_popup/local_omnibox_popup.js |
| @@ -2,6 +2,29 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| +// ========================================================== |
| +// Enums. |
| +// ========================================================== |
| +/** |
| +* The desired behavior for navigateContentWindow. |
| +* @enum {string} |
| +* @private |
| +*/ |
| +var WindowOpenDisposition_ = { |
|
samarth
2013/01/10 21:42:04
How come this doesn't match the other enum?
dougw
2013/01/18 23:54:30
Done.
|
| + UNKNOWN: 'a', |
| + SUPPRESS_OPEN: 'b', |
| + CURRENT_TAB: 'c', |
| + // Indicates that only one tab with the url should exist in the same window. |
| + SINGLETON_TAB: 'd', |
| + NEW_FOREGROUND_TAB: 'e', |
| + NEW_BACKGROUND_TAB: 'f', |
| + NEW_POPUP: 'g', |
| + NEW_WINDOW: 'h', |
| + SAVE_TO_DISK: 'i', |
| + OFF_THE_RECORD: 'j', |
| + IGNORE_ACTION: 'k' |
| +}; |
| + |
| // ============================================================================= |
| // Util functions |
| // ============================================================================= |
| @@ -170,7 +193,8 @@ function handleNativeSuggestions() { |
| function handleSuggestionClick(restrictedId) { |
| var apiHandle = getApiObjectHandle(); |
| clearSuggestions(); |
| - apiHandle.navigateContentWindow(restrictedId); |
| + apiHandle.navigateContentWindow(restrictedId, |
| + WindowOpenDisposition_.CURRENT_TAB); |
|
samarth
2013/01/10 21:42:04
Middle clicking should work correctly here as well
dougw
2013/01/18 23:54:30
I'd like to do this in a separate cl :)
|
| } |
| /** |