OLD | NEW |
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 }; | 49 }; |
50 | 50 |
51 enum OriginChipPosition { | 51 enum OriginChipPosition { |
52 ORIGIN_CHIP_DISABLED, | 52 ORIGIN_CHIP_DISABLED, |
53 ORIGIN_CHIP_LEADING_LOCATION_BAR, | 53 ORIGIN_CHIP_LEADING_LOCATION_BAR, |
54 ORIGIN_CHIP_TRAILING_LOCATION_BAR, | 54 ORIGIN_CHIP_TRAILING_LOCATION_BAR, |
55 ORIGIN_CHIP_LEADING_MENU_BUTTON, | 55 ORIGIN_CHIP_LEADING_MENU_BUTTON, |
56 ORIGIN_CHIP_NUM_VALUES, | 56 ORIGIN_CHIP_NUM_VALUES, |
57 }; | 57 }; |
58 | 58 |
59 enum OriginChipV2HideTrigger { | 59 enum OriginChipV2Condition { |
60 ORIGIN_CHIP_V2_DISABLED, | 60 ORIGIN_CHIP_V2_DISABLED, |
61 ORIGIN_CHIP_V2_HIDE_ON_MOUSE_RELEASE, | 61 ORIGIN_CHIP_V2_HIDE_ON_MOUSE_RELEASE, |
62 ORIGIN_CHIP_V2_HIDE_ON_USER_INPUT, | 62 ORIGIN_CHIP_V2_HIDE_ON_USER_INPUT, |
| 63 ORIGIN_CHIP_V2_ON_SRP, |
63 ORIGIN_CHIP_V2_NUM_VALUES, | 64 ORIGIN_CHIP_V2_NUM_VALUES, |
64 }; | 65 }; |
65 | 66 |
66 // Use this value for "start margin" to prevent the "es_sm" parameter from | 67 // Use this value for "start margin" to prevent the "es_sm" parameter from |
67 // being used. | 68 // being used. |
68 extern const int kDisableStartMargin; | 69 extern const int kDisableStartMargin; |
69 | 70 |
70 // Returns whether the Instant Extended API is enabled. | 71 // Returns whether the Instant Extended API is enabled. |
71 bool IsInstantExtendedAPIEnabled(); | 72 bool IsInstantExtendedAPIEnabled(); |
72 | 73 |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 OriginChipPosition GetOriginChipPosition(); | 204 OriginChipPosition GetOriginChipPosition(); |
204 | 205 |
205 // Returns true if version 2 of the origin chip should be shown. This version | 206 // Returns true if version 2 of the origin chip should be shown. This version |
206 // places the origin chip inside the location bar instead of the toolbar and | 207 // places the origin chip inside the location bar instead of the toolbar and |
207 // adds show/hide behavior and animations to make the relationship between the | 208 // adds show/hide behavior and animations to make the relationship between the |
208 // chip and the text in the Omnibox clearer. | 209 // chip and the text in the Omnibox clearer. |
209 bool ShouldDisplayOriginChipV2(); | 210 bool ShouldDisplayOriginChipV2(); |
210 | 211 |
211 // Returns a value indicating what event should trigger hiding the origin chip | 212 // Returns a value indicating what event should trigger hiding the origin chip |
212 // in the location bar. | 213 // in the location bar. |
213 OriginChipV2HideTrigger GetOriginChipV2HideTrigger(); | 214 OriginChipV2Condition GetOriginChipV2Condition(); |
214 | 215 |
215 // Returns true if the local new tab page should show a Google logo and search | 216 // Returns true if the local new tab page should show a Google logo and search |
216 // box for users whose default search provider is Google, or false if not. | 217 // box for users whose default search provider is Google, or false if not. |
217 bool ShouldShowGoogleLocalNTP(); | 218 bool ShouldShowGoogleLocalNTP(); |
218 | 219 |
219 // Transforms the input |url| into its "effective URL". The returned URL | 220 // Transforms the input |url| into its "effective URL". The returned URL |
220 // facilitates grouping process-per-site. The |url| is transformed, for | 221 // facilitates grouping process-per-site. The |url| is transformed, for |
221 // example, from | 222 // example, from |
222 // | 223 // |
223 // https://www.google.com/search?espv=1&q=tractors | 224 // https://www.google.com/search?espv=1&q=tractors |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 bool GetBoolValueForFlagWithDefault(const std::string& flag, | 297 bool GetBoolValueForFlagWithDefault(const std::string& flag, |
297 bool default_value, | 298 bool default_value, |
298 const FieldTrialFlags& flags); | 299 const FieldTrialFlags& flags); |
299 | 300 |
300 // Returns the Cacheable New Tab Page URL for the given |profile|. | 301 // Returns the Cacheable New Tab Page URL for the given |profile|. |
301 GURL GetNewTabPageURL(Profile* profile); | 302 GURL GetNewTabPageURL(Profile* profile); |
302 | 303 |
303 } // namespace chrome | 304 } // namespace chrome |
304 | 305 |
305 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_ | 306 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_ |
OLD | NEW |