Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / ios / public / provider / chrome / browser / search_provider.h
blobcb639bf4feb8f9ef4838487dc52bf52bc9f93d84
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SEARCH_PROVIDER_H_
6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SEARCH_PROVIDER_H_
8 #include <string>
10 #include "base/macros.h"
12 namespace ios {
14 // SearchProvider provides accessor for search features not yet componentized.
15 class SearchProvider {
16 public:
17 SearchProvider() {}
18 virtual ~SearchProvider() {}
20 // Returns whether query extraction is enabled.
21 virtual bool IsQueryExtractionEnabled() = 0;
23 // Returns a string indicating whether InstantExtended is enabled, suitable
24 // for adding as a query parameter to the search requests. Returns an empty
25 // string otherwise.
27 // |for_search| should be set to true for search requests, in which case this
28 // returns a non-empty string only if query extraction is enabled.
29 virtual std::string InstantExtendedEnabledParam(bool for_search) = 0;
31 // Returns a string that will cause the search results page to update
32 // incrementally. Currently, Instant Extended passes a different param to
33 // search results pages that also has this effect, so by default this function
34 // returns the empty string when Instant Extended is enabled. However, when
35 // doing instant search result prerendering, we still need to pass this param,
36 // as Instant Extended does not cause incremental updates by default for the
37 // prerender page. Callers should set |for_prerender| in this case to force
38 // the returned string to be non-empty.
39 virtual std::string ForceInstantResultsParam(bool for_prerender) = 0;
41 // Returns the start-edge margin of the omnibox in pixels.
42 virtual int OmniboxStartMargin() = 0;
44 // Returns the value to use for replacements of type
45 // GOOGLE_IMAGE_SEARCH_SOURCE.
46 virtual std::string GoogleImageSearchSource() = 0;
48 private:
49 DISALLOW_COPY_AND_ASSIGN(SearchProvider);
52 } // namespace
54 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SEARCH_PROVIDER_H_