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

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

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: '' 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 #ifndef CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_H_ 5 #ifndef CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_H_
6 #define CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_H_ 6 #define CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 virtual bool ShouldSendThemeBackgroundInfo() = 0; 112 virtual bool ShouldSendThemeBackgroundInfo() = 0;
113 virtual bool ShouldSendToggleVoiceSearch() = 0; 113 virtual bool ShouldSendToggleVoiceSearch() = 0;
114 virtual bool ShouldSubmitQuery() = 0; 114 virtual bool ShouldSubmitQuery() = 0;
115 }; 115 };
116 116
117 SearchIPCRouter(content::WebContents* web_contents, Delegate* delegate, 117 SearchIPCRouter(content::WebContents* web_contents, Delegate* delegate,
118 scoped_ptr<Policy> policy); 118 scoped_ptr<Policy> policy);
119 ~SearchIPCRouter() override; 119 ~SearchIPCRouter() override;
120 120
121 // Tells the SearchIPCRouter that a new page in an Instant process committed. 121 // Tells the SearchIPCRouter that a new page in an Instant process committed.
122 void OnNavigationEntryCommitted(); 122 void OnNavigationEntryCommitted();
Mark P 2014/11/17 19:15:58 To confirm, are you sure you don't need to modify
kmadhusu 2014/11/17 22:52:05 Yes. I don't need to modify this.
123 123
124 // Tells the renderer to determine if the page supports the Instant API, which 124 // Tells the renderer to determine if the page supports the Instant API, which
125 // results in a call to OnInstantSupportDetermined() when the reply is 125 // results in a call to OnInstantSupportDetermined() when the reply is
126 // received. 126 // received.
127 void DetermineIfPageSupportsInstant(); 127 void DetermineIfPageSupportsInstant();
128 128
129 // Tells the renderer about the result of the Chrome identity check. 129 // Tells the renderer about the result of the Chrome identity check.
130 void SendChromeIdentityCheckResult(const base::string16& identity, 130 void SendChromeIdentityCheckResult(const base::string16& identity,
131 bool identity_match); 131 bool identity_match);
132 132
133 // Tells the renderer information it needs to display promos. 133 // Tells the renderer information it needs to display promos.
134 void SetPromoInformation(bool is_app_launcher_enabled); 134 void SetPromoInformation(bool is_app_launcher_enabled);
135 135
136 // Tells the renderer whether to display the Instant results. 136 // Tells the renderer whether to display the Instant results.
Mark P 2014/11/17 19:15:58 To confirm, are you sure you don't need to modify
kmadhusu 2014/11/17 22:52:05 Yes. I don't need to modify this.
137 void SetDisplayInstantResults(); 137 void SetDisplayInstantResults();
138 138
139 // Tells the page the suggestion to be prefetched if any. 139 // Tells the page the suggestion to be prefetched if any.
140 void SetSuggestionToPrefetch(const InstantSuggestion& suggestion); 140 void SetSuggestionToPrefetch(const InstantSuggestion& suggestion);
141 141
142 // Tells the page the left margin of the omnibox. This is used by the page to 142 // Tells the page the left margin of the omnibox. This is used by the page to
143 // align text or assets properly with the omnibox. 143 // align text or assets properly with the omnibox.
144 void SetOmniboxStartMargin(int start_margin); 144 void SetOmniboxStartMargin(int start_margin);
145 145
146 // Tells the page that user input started or stopped. 146 // Tells the page that user input started or stopped.
147 void SetInputInProgress(bool input_in_progress); 147 void SetInputInProgress(bool input_in_progress);
148 148
149 // Tells the page that the omnibox focus has changed. 149 // Tells the page that the omnibox focus has changed.
150 void OmniboxFocusChanged(OmniboxFocusState state, 150 void OmniboxFocusChanged(OmniboxFocusState state,
151 OmniboxFocusChangeReason reason); 151 OmniboxFocusChangeReason reason);
152 152
153 // Tells the renderer about the most visited items. 153 // Tells the renderer about the most visited items.
154 void SendMostVisitedItems(const std::vector<InstantMostVisitedItem>& items); 154 void SendMostVisitedItems(const std::vector<InstantMostVisitedItem>& items);
155 155
156 // Tells the renderer about the current theme background. 156 // Tells the renderer about the current theme background.
157 void SendThemeBackgroundInfo(const ThemeBackgroundInfo& theme_info); 157 void SendThemeBackgroundInfo(const ThemeBackgroundInfo& theme_info);
158 158
159 // Tells the page to toggle voice search. 159 // Tells the page to toggle voice search.
160 void ToggleVoiceSearch(); 160 void ToggleVoiceSearch();
161 161
162 // Tells the page that the user pressed Enter in the omnibox. 162 // Tells the page that the user pressed Enter in the omnibox.
163 void Submit(const base::string16& text); 163 void Submit(const base::string16& text,
164 const EmbeddedSearchRequestParams& params);
164 165
165 // Called when the tab corresponding to |this| instance is activated. 166 // Called when the tab corresponding to |this| instance is activated.
166 void OnTabActivated(); 167 void OnTabActivated();
167 168
168 // Called when the tab corresponding to |this| instance is deactivated. 169 // Called when the tab corresponding to |this| instance is deactivated.
169 void OnTabDeactivated(); 170 void OnTabDeactivated();
170 171
171 private: 172 private:
172 friend class SearchIPCRouterPolicyTest; 173 friend class SearchIPCRouterPolicyTest;
173 friend class SearchIPCRouterTest; 174 friend class SearchIPCRouterTest;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 // SearchIPCRouter to ensure that delayed IPC replies are ignored. 229 // SearchIPCRouter to ensure that delayed IPC replies are ignored.
229 int commit_counter_; 230 int commit_counter_;
230 231
231 // Set to true, when the tab corresponding to |this| instance is active. 232 // Set to true, when the tab corresponding to |this| instance is active.
232 bool is_active_tab_; 233 bool is_active_tab_;
233 234
234 DISALLOW_COPY_AND_ASSIGN(SearchIPCRouter); 235 DISALLOW_COPY_AND_ASSIGN(SearchIPCRouter);
235 }; 236 };
236 237
237 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_H_ 238 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698