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

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

Issue 749693005: Remove SearchButton. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@no-origin-2
Patch Set: Merge to HEAD Created 5 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/search/search.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_SEARCH_SEARCH_H_ 5 #ifndef CHROME_BROWSER_SEARCH_SEARCH_H_
6 #define CHROME_BROWSER_SEARCH_SEARCH_H_ 6 #define CHROME_BROWSER_SEARCH_SEARCH_H_
7 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 29 matching lines...) Expand all
40 enum OptInState { 40 enum OptInState {
41 // The user has not manually opted in/out of InstantExtended. 41 // The user has not manually opted in/out of InstantExtended.
42 INSTANT_EXTENDED_NOT_SET, 42 INSTANT_EXTENDED_NOT_SET,
43 // The user has opted-in to InstantExtended. 43 // The user has opted-in to InstantExtended.
44 INSTANT_EXTENDED_OPT_IN, 44 INSTANT_EXTENDED_OPT_IN,
45 // The user has opted-out of InstantExtended. 45 // The user has opted-out of InstantExtended.
46 INSTANT_EXTENDED_OPT_OUT, 46 INSTANT_EXTENDED_OPT_OUT,
47 INSTANT_EXTENDED_OPT_IN_STATE_ENUM_COUNT, 47 INSTANT_EXTENDED_OPT_IN_STATE_ENUM_COUNT,
48 }; 48 };
49 49
50 enum DisplaySearchButtonConditions {
51 DISPLAY_SEARCH_BUTTON_NEVER,
52 DISPLAY_SEARCH_BUTTON_FOR_STR, // STR = Search Term Replacement
53 DISPLAY_SEARCH_BUTTON_FOR_STR_OR_IIP, // IIP = Input In Progress
54 DISPLAY_SEARCH_BUTTON_ALWAYS,
55 DISPLAY_SEARCH_BUTTON_NUM_VALUES,
56 };
57
58 // Use this value for "start margin" to prevent the "es_sm" parameter from 50 // Use this value for "start margin" to prevent the "es_sm" parameter from
59 // being used. 51 // being used.
60 extern const int kDisableStartMargin; 52 extern const int kDisableStartMargin;
61 53
62 // Returns whether the suggest is enabled for the given |profile|. 54 // Returns whether the suggest is enabled for the given |profile|.
63 bool IsSuggestPrefEnabled(Profile* profile); 55 bool IsSuggestPrefEnabled(Profile* profile);
64 56
65 // Returns a string indicating whether InstantExtended is enabled, suitable 57 // Returns a string indicating whether InstantExtended is enabled, suitable
66 // for adding as a query string param to the homepage or search requests. 58 // for adding as a query string param to the homepage or search requests.
67 // Returns an empty string otherwise. 59 // Returns an empty string otherwise.
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 bool ShouldPrerenderInstantUrlOnOmniboxFocus(); 163 bool ShouldPrerenderInstantUrlOnOmniboxFocus();
172 164
173 // Returns true if 'reuse_instant_search_base_page' flag is set to true in field 165 // Returns true if 'reuse_instant_search_base_page' flag is set to true in field
174 // trials to reuse the prerendered page to commit any search query. 166 // trials to reuse the prerendered page to commit any search query.
175 bool ShouldReuseInstantSearchBasePage(); 167 bool ShouldReuseInstantSearchBasePage();
176 168
177 // Returns the Local Instant URL of the New Tab Page. 169 // Returns the Local Instant URL of the New Tab Page.
178 // TODO(kmadhusu): Remove this function and update the call sites. 170 // TODO(kmadhusu): Remove this function and update the call sites.
179 GURL GetLocalInstantURL(Profile* profile); 171 GURL GetLocalInstantURL(Profile* profile);
180 172
181 // Returns when we should show a search button in the omnibox. This may be any
182 // of several values, some of which depend on whether the underlying state of
183 // the page would normally be to perform search term replacement; see also
184 // ToolbarModel::WouldPerformSearchTermReplacement().
185 DisplaySearchButtonConditions GetDisplaySearchButtonConditions();
186
187 // Returns true if the local new tab page should show a Google logo and search 173 // Returns true if the local new tab page should show a Google logo and search
188 // box for users whose default search provider is Google, or false if not. 174 // box for users whose default search provider is Google, or false if not.
189 bool ShouldShowGoogleLocalNTP(); 175 bool ShouldShowGoogleLocalNTP();
190 176
191 // Transforms the input |url| into its "effective URL". The returned URL 177 // Transforms the input |url| into its "effective URL". The returned URL
192 // facilitates grouping process-per-site. The |url| is transformed, for 178 // facilitates grouping process-per-site. The |url| is transformed, for
193 // example, from 179 // example, from
194 // 180 //
195 // https://www.google.com/search?espv=1&q=tractors 181 // https://www.google.com/search?espv=1&q=tractors
196 // 182 //
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 233
248 // Returns true if 'use_search_path_for_instant' flag is set to true in field 234 // Returns true if 'use_search_path_for_instant' flag is set to true in field
249 // trials to use an '/search' path in an alternate Instant search base page URL 235 // trials to use an '/search' path in an alternate Instant search base page URL
250 // for prefetching search results. This allows experimentation of Instant 236 // for prefetching search results. This allows experimentation of Instant
251 // search. 237 // search.
252 bool ShouldUseSearchPathForInstant(); 238 bool ShouldUseSearchPathForInstant();
253 239
254 } // namespace chrome 240 } // namespace chrome
255 241
256 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_ 242 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/search/search.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698