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

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

Issue 11466007: Add new IPC for searchbox to pipe SearchBox NavigateContentWindow calls to the browser. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Remove extra ; Created 8 years 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') | content/common/content_param_traits_macros.h » ('j') | 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 bfad96240cc13820b11a1d08ec1d53ec432ffe0b..3fda904cba8f9f38146aba2f71ebbe4e75419344 100644
--- a/chrome/renderer/searchbox/searchbox_extension.cc
+++ b/chrome/renderer/searchbox/searchbox_extension.cc
@@ -633,20 +633,21 @@ v8::Handle<v8::Value> SearchBoxExtensionWrapper::NavigateContentWindow(
if (!render_view || !args.Length()) return v8::Undefined();
GURL destination_url;
+ content::PageTransition transition = content::PAGE_TRANSITION_TYPED;
if (args[0]->IsNumber()) {
const InstantAutocompleteResult* result = SearchBox::Get(render_view)->
GetAutocompleteResultWithId(args[0]->Uint32Value());
- if (result)
+ if (result) {
destination_url = GURL(result->destination_url);
+ transition = result->transition;
+ }
} else {
destination_url = GURL(V8ValueToUTF16(args[0]));
}
// Navigate the main frame.
- if (destination_url.is_valid()) {
- WebKit::WebURLRequest request(destination_url);
- render_view->GetWebView()->mainFrame()->loadRequest(request);
- }
+ if (destination_url.is_valid())
+ SearchBox::Get(render_view)->NavigateToURL(destination_url, transition);
return v8::Undefined();
}
« no previous file with comments | « chrome/renderer/searchbox/searchbox.cc ('k') | content/common/content_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698