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

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, 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/renderer/searchbox/searchbox.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/searchbox/searchbox_extension.cc
diff --git a/chrome/renderer/searchbox/searchbox_extension.cc b/chrome/renderer/searchbox/searchbox_extension.cc
index 90f7a00dad846af02f26d849ffca36b8c0d67bbf..082ac95b02e5a6643bd076e0be50b98735ec0752 100644
--- a/chrome/renderer/searchbox/searchbox_extension.cc
+++ b/chrome/renderer/searchbox/searchbox_extension.cc
@@ -18,6 +18,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "ui/base/keycodes/keyboard_codes.h"
#include "ui/base/resource/resource_bundle.h"
+#include "ui/base/window_open_disposition.h"
#include "v8/include/v8.h"
namespace {
@@ -707,9 +708,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]->Uint32Value() == 2)
+ disposition = NEW_BACKGROUND_TAB;
+ SearchBox::Get(render_view)->NavigateToURL(
+ destination_url, transition, disposition);
+ }
return v8::Undefined();
}
« no previous file with comments | « chrome/renderer/searchbox/searchbox.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698