Chromium Code Reviews| Index: chrome/renderer/searchbox/searchbox_extension.cc |
| diff --git a/chrome/renderer/searchbox/searchbox_extension.cc b/chrome/renderer/searchbox/searchbox_extension.cc |
| index 25eddb13169db4b6ba9665f117a403c40d7a0d6b..a38c7b11f20ee82d3ae0233ea291f341119ed578 100644 |
| --- a/chrome/renderer/searchbox/searchbox_extension.cc |
| +++ b/chrome/renderer/searchbox/searchbox_extension.cc |
| @@ -18,6 +18,8 @@ |
| #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 +700,17 @@ 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()) { |
| + if (args[1]->Uint32Value() == NEW_BACKGROUND_TAB) { |
|
samarth
2013/01/10 21:42:04
Is disposition supposed to be optional? Do you ne
samarth
2013/01/10 21:42:04
Don't use NEW_BACKGROUND_TAB here. We don't want t
dougw
2013/01/18 23:54:30
Done.
dougw
2013/01/18 23:54:30
Done.
|
| + SearchBox::Get(render_view)->NavigateToURL(destination_url, |
| + transition, |
| + NEW_BACKGROUND_TAB); |
| + } else { |
| + SearchBox::Get(render_view)->NavigateToURL(destination_url, |
| + transition, |
| + CURRENT_TAB); |
| + } |
| + } |
| return v8::Undefined(); |
| } |