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

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

Issue 13905008: Merge local_omnibox_popup into local_ntp. Render the Google logo and fakebox if Google is the sear… (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Respond to comments. Created 7 years, 8 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
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 // if the engine doesn't have an Instant URL, or if it shouldn't be used (say 94 // if the engine doesn't have an Instant URL, or if it shouldn't be used (say
95 // because it doesn't satisfy the requirements for extended mode or if Instant 95 // because it doesn't satisfy the requirements for extended mode or if Instant
96 // is disabled through preferences). Callers must check that the returned URL is 96 // is disabled through preferences). Callers must check that the returned URL is
97 // valid before using it. The value of |start_margin| is used for the "es_sm" 97 // valid before using it. The value of |start_margin| is used for the "es_sm"
98 // parameter in the URL. 98 // parameter in the URL.
99 // NOTE: This method expands the default search engine's instant_url template, 99 // NOTE: This method expands the default search engine's instant_url template,
100 // so it shouldn't be called from SearchTermsData or other such code that would 100 // so it shouldn't be called from SearchTermsData or other such code that would
101 // lead to an infinite recursion. 101 // lead to an infinite recursion.
102 GURL GetInstantURL(Profile* profile, int start_margin); 102 GURL GetInstantURL(Profile* profile, int start_margin);
103 103
104 // Returns the Local Instant URL of the default search engine. In particular,
105 // a Google search provider will include a special query parameter, indicating
106 // to the JS that Google-specific New Tab Page elements should be rendered.
107 GURL GetLocalInstantURL(Profile* profile);
108
104 // Instant (loading a remote server page and talking to it using the searchbox 109 // Instant (loading a remote server page and talking to it using the searchbox
105 // API) is considered enabled if there's a valid Instant URL that can be used, 110 // API) is considered enabled if there's a valid Instant URL that can be used,
106 // so this simply returns whether GetInstantURL() is a valid URL. 111 // so this simply returns whether GetInstantURL() is a valid URL.
107 // NOTE: This method expands the default search engine's instant_ur templatel, 112 // NOTE: This method expands the default search engine's instant_ur templatel,
108 // so it shouldn't be called from SearchTermsData or other such code that would 113 // so it shouldn't be called from SearchTermsData or other such code that would
109 // lead to an infinite recursion. 114 // lead to an infinite recursion.
110 bool IsInstantEnabled(Profile* profile); 115 bool IsInstantEnabled(Profile* profile);
111 116
112 // Returns true if the aggressive local NTP fallback is enabled in field 117 // Returns true if the aggressive local NTP fallback is enabled in field
113 // trials. 118 // trials.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 GURL CoerceCommandLineURLToTemplateURL(const GURL& instant_url, 167 GURL CoerceCommandLineURLToTemplateURL(const GURL& instant_url,
163 const TemplateURLRef& ref, 168 const TemplateURLRef& ref,
164 int start_margin); 169 int start_margin);
165 170
166 // Returns true if |my_url| matches |other_url|. 171 // Returns true if |my_url| matches |other_url|.
167 bool MatchesOriginAndPath(const GURL& my_url, const GURL& other_url); 172 bool MatchesOriginAndPath(const GURL& my_url, const GURL& other_url);
168 173
169 } // namespace chrome 174 } // namespace chrome
170 175
171 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_ 176 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698