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

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

Issue 11644009: Added support for passing WindowOpenDisposition into BrowserInstantController::OpenURL() from the o… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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/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 fa44d0edc374e3ba0fd596d61981c18da1c17050..125f6cf5026eeefc69b9c618b0643f4d34b37310 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.
+// ==========================================================
+/**
+ * Possible behaviors for navigateContentWindow.
+ * @enum {number}
+ * @private
+ */
+var WindowOpenDisposition_ = {
+ CURRENT_TAB: 1,
+ NEW_BACKGROUND_TAB: 2
+};
+
+// ==========================================================
+// Component dependencies.
sreeram 2013/01/22 06:01:19 Huh? That's a strange name. Also, why define this
samarth 2013/01/22 16:13:32 Agreed. As you have it right now, you could just l
dougw 2013/01/24 03:05:25 Done.
dougw 2013/01/24 03:05:25 Done.
+// ==========================================================
+/**
+ * @type {number}
+ * @private
+ * @const
+ */
+var MIDDLE_MOUSE_BUTTON_ = 1;
+
// =============================================================================
// Util functions
// =============================================================================
@@ -202,7 +225,9 @@ function appendSuggestionStyles() {
*/
function handleSuggestionClick(restrictedId) {
clearSuggestions();
- getApiObjectHandle().navigateContentWindow(restrictedId);
+ var disposition = WindowOpenDisposition_.CURRENT_TAB;
+ getApiObjectHandle().navigateContentWindow(
+ restrictedId, disposition);
}
/**

Powered by Google App Engine
This is Rietveld 408576698