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

Side by Side Diff: ios/public/provider/chrome/browser/search_provider.h

Issue 1260033003: Partially componentize //chrome/browser/search/search.{h,cc} (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation on iOS Created 5 years, 4 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
OLDNEW
(Empty)
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.
4
5 #ifndef IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SEARCH_PROVIDER_H_
6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SEARCH_PROVIDER_H_
7
8 #include <string>
9
10 #include "base/macros.h"
11
12 namespace ios {
13
14 // SearchProvider provides accessor for search features not yet componentized.
15 class SearchProvider {
16 public:
17 SearchProvider() {}
18 virtual ~SearchProvider() {}
19
20 // Returns whether query extraction is enabled.
21 virtual bool IsQueryExtractionEnabled() = 0;
22
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.
26 //
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;
30
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;
40
41 // Returns the start-edge margin of the omnibox in pixels.
42 virtual int OmniboxStartMargin() = 0;
43
44 private:
45 DISALLOW_COPY_AND_ASSIGN(SearchProvider);
46 };
47
48 } // namespace
49
50 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_SEARCH_PROVIDER_H_
OLDNEW
« no previous file with comments | « ios/public/provider/chrome/browser/chrome_browser_provider.cc ('k') | ios/public/test/fake_search_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698