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

Unified Diff: chrome/renderer/searchbox/searchbox_extension.cc

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/renderer/searchbox/searchbox_extension.cc
diff --git a/chrome/renderer/searchbox/searchbox_extension.cc b/chrome/renderer/searchbox/searchbox_extension.cc
index db8bc11cde44c3aa89ea96c57f5e199360ef0953..6ad049c90ff4c2b8bab45339a536b98526a89cbf 100644
--- a/chrome/renderer/searchbox/searchbox_extension.cc
+++ b/chrome/renderer/searchbox/searchbox_extension.cc
@@ -18,6 +18,7 @@
#include "ui/base/keycodes/keyboard_codes.h"
#include "ui/base/resource/resource_bundle.h"
#include "v8/include/v8.h"
+#include "webkit/glue/window_open_disposition.h"
namespace {
@@ -698,9 +699,13 @@ v8::Handle<v8::Value> SearchBoxExtensionWrapper::NavigateContentWindow(
}
// Navigate the main frame.
- if (destination_url.is_valid())
- SearchBox::Get(render_view)->NavigateToURL(destination_url, transition);
-
+ if (destination_url.is_valid()) {
+ WindowOpenDisposition disposition = CURRENT_TAB;
+ if ((args[1]->IsUint32()) && (args[1]->Uint32Value() == 2))
sreeram 2013/01/22 06:01:19 You don't need the first clause. Just this: if
dougw 2013/01/24 03:05:25 Done.
+ disposition = NEW_BACKGROUND_TAB;
+ SearchBox::Get(render_view)->NavigateToURL(
+ destination_url, transition, disposition);
+ }
return v8::Undefined();
}

Powered by Google App Engine
This is Rietveld 408576698