| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_SEARCH_ENGINES_SEARCH_TERMS_DATA_H_ | 5 #ifndef COMPONENTS_SEARCH_ENGINES_SEARCH_TERMS_DATA_H_ |
| 6 #define COMPONENTS_SEARCH_ENGINES_SEARCH_TERMS_DATA_H_ | 6 #define COMPONENTS_SEARCH_ENGINES_SEARCH_TERMS_DATA_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 // requests. See GetSuggestRequestIdentifier() for more details. | 42 // requests. See GetSuggestRequestIdentifier() for more details. |
| 43 // This implementation returns the empty string. | 43 // This implementation returns the empty string. |
| 44 virtual std::string GetSuggestClient() const; | 44 virtual std::string GetSuggestClient() const; |
| 45 | 45 |
| 46 // The suggest request identifier parameter ("gs_ri") passed with Google | 46 // The suggest request identifier parameter ("gs_ri") passed with Google |
| 47 // suggest requests. Along with suggestclient (See GetSuggestClient()), | 47 // suggest requests. Along with suggestclient (See GetSuggestClient()), |
| 48 // this parameter controls what suggestion results are returned. | 48 // this parameter controls what suggestion results are returned. |
| 49 // This implementation returns the empty string. | 49 // This implementation returns the empty string. |
| 50 virtual std::string GetSuggestRequestIdentifier() const; | 50 virtual std::string GetSuggestRequestIdentifier() const; |
| 51 | 51 |
| 52 // Returns true if search terms are shown in the omnibox on search results | |
| 53 // pages. | |
| 54 virtual bool IsShowingSearchTermsOnSearchResultsPages() const; | |
| 55 | |
| 56 // Returns a string indicating whether InstantExtended is enabled. | 52 // Returns a string indicating whether InstantExtended is enabled. |
| 57 virtual std::string InstantExtendedEnabledParam(bool for_search) const; | 53 virtual std::string InstantExtendedEnabledParam(bool for_search) const; |
| 58 | 54 |
| 59 // Returns a string that will cause the search results page to update | 55 // Returns a string that will cause the search results page to update |
| 60 // incrementally. | 56 // incrementally. |
| 61 virtual std::string ForceInstantResultsParam(bool for_prerender) const; | 57 virtual std::string ForceInstantResultsParam(bool for_prerender) const; |
| 62 | 58 |
| 63 // Returns the start-edge margin of the omnibox in pixels. | |
| 64 virtual int OmniboxStartMargin() const; | |
| 65 | |
| 66 // Returns a string indicating whether a non-default theme is active, | |
| 67 // suitable for adding as a query string param to the homepage. This only | |
| 68 // applies if Instant Extended is enabled. Returns an empty string otherwise. | |
| 69 // Determining this requires accessing the Profile, so this can only ever be | |
| 70 // non-empty for UIThreadSearchTermsData. | |
| 71 virtual std::string NTPIsThemedParam() const; | |
| 72 | |
| 73 // Returns a string indicating which webview is currently in use on iOS, | 59 // Returns a string indicating which webview is currently in use on iOS, |
| 74 // suitable for adding as a query string param to search requests. Returns an | 60 // suitable for adding as a query string param to search requests. Returns an |
| 75 // empty string if no parameter should be passed along with search requests. | 61 // empty string if no parameter should be passed along with search requests. |
| 76 virtual std::string IOSWebViewTypeParam() const; | 62 virtual std::string IOSWebViewTypeParam() const; |
| 77 | 63 |
| 78 // Returns the value to use for replacements of type | 64 // Returns the value to use for replacements of type |
| 79 // GOOGLE_IMAGE_SEARCH_SOURCE. | 65 // GOOGLE_IMAGE_SEARCH_SOURCE. |
| 80 virtual std::string GoogleImageSearchSource() const; | 66 virtual std::string GoogleImageSearchSource() const; |
| 81 | 67 |
| 82 // Returns a string with languages understood by the user. | 68 // Returns a string with languages understood by the user. |
| 83 // Determining this requires accessing the Profile, so this can only ever be | 69 // Determining this requires accessing the Profile, so this can only ever be |
| 84 // non-empty for UIThreadSearchTermsData. | 70 // non-empty for UIThreadSearchTermsData. |
| 85 virtual std::string GetAcceptLanguages() const; | 71 virtual std::string GetAcceptLanguages() const; |
| 86 | 72 |
| 87 private: | 73 private: |
| 88 DISALLOW_COPY_AND_ASSIGN(SearchTermsData); | 74 DISALLOW_COPY_AND_ASSIGN(SearchTermsData); |
| 89 }; | 75 }; |
| 90 | 76 |
| 91 #endif // COMPONENTS_SEARCH_ENGINES_SEARCH_TERMS_DATA_H_ | 77 #endif // COMPONENTS_SEARCH_ENGINES_SEARCH_TERMS_DATA_H_ |
| OLD | NEW |