| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 // been extracted. Failing that, it tries to extract search terms from the URL. | 123 // been extracted. Failing that, it tries to extract search terms from the URL. |
| 124 // | 124 // |
| 125 // Returns a blank string if search terms were not found, or if search terms | 125 // Returns a blank string if search terms were not found, or if search terms |
| 126 // extraction is disabled for this WebContents or profile, or if |contents| | 126 // extraction is disabled for this WebContents or profile, or if |contents| |
| 127 // does not support Instant. | 127 // does not support Instant. |
| 128 base::string16 GetSearchTerms(const content::WebContents* contents); | 128 base::string16 GetSearchTerms(const content::WebContents* contents); |
| 129 | 129 |
| 130 // Returns true if |url| should be rendered in the Instant renderer process. | 130 // Returns true if |url| should be rendered in the Instant renderer process. |
| 131 bool ShouldAssignURLToInstantRenderer(const GURL& url, Profile* profile); | 131 bool ShouldAssignURLToInstantRenderer(const GURL& url, Profile* profile); |
| 132 | 132 |
| 133 // Returns true if |contents| is rendered inside the Instant process for |
| 134 // |profile|. |
| 135 bool IsRenderedInInstantProcess(const content::WebContents* contents, |
| 136 Profile* profile); |
| 137 |
| 133 // Returns true if the Instant |url| should use process per site. | 138 // Returns true if the Instant |url| should use process per site. |
| 134 bool ShouldUseProcessPerSiteForInstantURL(const GURL& url, Profile* profile); | 139 bool ShouldUseProcessPerSiteForInstantURL(const GURL& url, Profile* profile); |
| 135 | 140 |
| 136 // Returns true if |url| corresponds to a New Tab page (it can be either an | 141 // Returns true if |url| corresponds to a New Tab page (it can be either an |
| 137 // Instant Extended NTP or a non-extended NTP). | 142 // Instant Extended NTP or a non-extended NTP). |
| 138 bool IsNTPURL(const GURL& url, Profile* profile); | 143 bool IsNTPURL(const GURL& url, Profile* profile); |
| 139 | 144 |
| 140 // Returns true if the visible entry of |contents| is a New Tab Page rendered | 145 // Returns true if the visible entry of |contents| is a New Tab Page rendered |
| 141 // by Instant. A page that matches the search or Instant URL of the default | 146 // by Instant. A page that matches the search or Instant URL of the default |
| 142 // search provider but does not have any search terms is considered an Instant | 147 // search provider but does not have any search terms is considered an Instant |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 bool GetBoolValueForFlagWithDefault(const std::string& flag, | 302 bool GetBoolValueForFlagWithDefault(const std::string& flag, |
| 298 bool default_value, | 303 bool default_value, |
| 299 const FieldTrialFlags& flags); | 304 const FieldTrialFlags& flags); |
| 300 | 305 |
| 301 // Returns the Cacheable New Tab Page URL for the given |profile|. | 306 // Returns the Cacheable New Tab Page URL for the given |profile|. |
| 302 GURL GetNewTabPageURL(Profile* profile); | 307 GURL GetNewTabPageURL(Profile* profile); |
| 303 | 308 |
| 304 } // namespace chrome | 309 } // namespace chrome |
| 305 | 310 |
| 306 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_ | 311 #endif // CHROME_BROWSER_SEARCH_SEARCH_H_ |
| OLD | NEW |