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

Side by Side Diff: chrome/browser/ui/search/search_ipc_router.cc

Issue 609493002: Propagate the search request params from the browser to the Instant search base page to fix the embe (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/search/search_ipc_router.h" 5 #include "chrome/browser/ui/search/search_ipc_router.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/search/search.h" 8 #include "chrome/browser/search/search.h"
9 #include "chrome/common/render_messages.h" 9 #include "chrome/common/render_messages.h"
10 #include "content/public/browser/navigation_details.h" 10 #include "content/public/browser/navigation_details.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 Send(new ChromeViewMsg_SearchBoxThemeChanged(routing_id(), theme_info)); 129 Send(new ChromeViewMsg_SearchBoxThemeChanged(routing_id(), theme_info));
130 } 130 }
131 131
132 void SearchIPCRouter::ToggleVoiceSearch() { 132 void SearchIPCRouter::ToggleVoiceSearch() {
133 if (!policy_->ShouldSendToggleVoiceSearch()) 133 if (!policy_->ShouldSendToggleVoiceSearch())
134 return; 134 return;
135 135
136 Send(new ChromeViewMsg_SearchBoxToggleVoiceSearch(routing_id())); 136 Send(new ChromeViewMsg_SearchBoxToggleVoiceSearch(routing_id()));
137 } 137 }
138 138
139 void SearchIPCRouter::Submit(const base::string16& text) { 139 void SearchIPCRouter::Submit(const base::string16& text,
140 const EmbeddedSearchRequestParams& params) {
140 if (!policy_->ShouldSubmitQuery()) 141 if (!policy_->ShouldSubmitQuery())
141 return; 142 return;
142 143
143 Send(new ChromeViewMsg_SearchBoxSubmit(routing_id(), text)); 144 Send(new ChromeViewMsg_SearchBoxSubmit(routing_id(), text, params));
144 } 145 }
145 146
146 void SearchIPCRouter::OnTabActivated() { 147 void SearchIPCRouter::OnTabActivated() {
147 is_active_tab_ = true; 148 is_active_tab_ = true;
148 } 149 }
149 150
150 void SearchIPCRouter::OnTabDeactivated() { 151 void SearchIPCRouter::OnTabDeactivated() {
151 is_active_tab_ = false; 152 is_active_tab_ = false;
152 } 153 }
153 154
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 335
335 void SearchIPCRouter::set_delegate_for_testing(Delegate* delegate) { 336 void SearchIPCRouter::set_delegate_for_testing(Delegate* delegate) {
336 DCHECK(delegate); 337 DCHECK(delegate);
337 delegate_ = delegate; 338 delegate_ = delegate;
338 } 339 }
339 340
340 void SearchIPCRouter::set_policy_for_testing(scoped_ptr<Policy> policy) { 341 void SearchIPCRouter::set_policy_for_testing(scoped_ptr<Policy> policy) {
341 DCHECK(policy.get()); 342 DCHECK(policy.get());
342 policy_.reset(policy.release()); 343 policy_.reset(policy.release());
343 } 344 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/search/search_ipc_router.h ('k') | chrome/browser/ui/search/search_ipc_router_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698