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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 // been extracted. Failing that, it tries to extract search terms from the URL. | 114 // been extracted. Failing that, it tries to extract search terms from the URL. |
115 // | 115 // |
116 // Returns a blank string if search terms were not found, or if search terms | 116 // Returns a blank string if search terms were not found, or if search terms |
117 // extraction is disabled for this WebContents or profile, or if |contents| | 117 // extraction is disabled for this WebContents or profile, or if |contents| |
118 // does not support Instant. | 118 // does not support Instant. |
119 base::string16 GetSearchTerms(const content::WebContents* contents); | 119 base::string16 GetSearchTerms(const content::WebContents* contents); |
120 | 120 |
121 // Returns true if |url| should be rendered in the Instant renderer process. | 121 // Returns true if |url| should be rendered in the Instant renderer process. |
122 bool ShouldAssignURLToInstantRenderer(const GURL& url, Profile* profile); | 122 bool ShouldAssignURLToInstantRenderer(const GURL& url, Profile* profile); |
123 | 123 |
| 124 // Returns true if |contents| is rendered inside the Instant process for |
| 125 // |profile|. |
| 126 bool IsRenderedInInstantProcess(const content::WebContents* contents, |
| 127 Profile* profile); |
| 128 |
124 // Returns true if the Instant |url| should use process per site. | 129 // Returns true if the Instant |url| should use process per site. |
125 bool ShouldUseProcessPerSiteForInstantURL(const GURL& url, Profile* profile); | 130 bool ShouldUseProcessPerSiteForInstantURL(const GURL& url, Profile* profile); |
126 | 131 |
127 // Returns true if |url| corresponds to a New Tab page (it can be either an | 132 // Returns true if |url| corresponds to a New Tab page (it can be either an |
128 // Instant Extended NTP or a non-extended NTP). | 133 // Instant Extended NTP or a non-extended NTP). |
129 bool IsNTPURL(const GURL& url, Profile* profile); | 134 bool IsNTPURL(const GURL& url, Profile* profile); |
130 | 135 |
131 // Returns true if the visible entry of |contents| is a New Tab Page rendered | 136 // Returns true if the visible entry of |contents| is a New Tab Page rendered |
132 // by Instant. A page that matches the search or Instant URL of the default | 137 // by Instant. A page that matches the search or Instant URL of the default |
133 // search provider but does not have any search terms is considered an Instant | 138 // search provider but does not have any search terms is considered an Instant |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 bool GetBoolValueForFlagWithDefault(const std::string& flag, | 290 bool GetBoolValueForFlagWithDefault(const std::string& flag, |
286 bool default_value, | 291 bool default_value, |
287 const FieldTrialFlags& flags); | 292 const FieldTrialFlags& flags); |
288 | 293 |
289 // Returns the Cacheable New Tab Page URL for the given |profile|. | 294 // Returns the Cacheable New Tab Page URL for the given |profile|. |
290 GURL GetNewTabPageURL(Profile* profile); | 295 GURL GetNewTabPageURL(Profile* profile); |
291 | 296 |
292 } // namespace chrome | 297 } // namespace chrome |
293 | 298 |
294 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_ | 299 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_ |
OLD | NEW |