| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_UI_SEARCH_INSTANT_SEARCH_PRERENDERER_H_ | 5 #ifndef CHROME_BROWSER_UI_SEARCH_INSTANT_SEARCH_PRERENDERER_H_ |
| 6 #define CHROME_BROWSER_UI_SEARCH_INSTANT_SEARCH_PRERENDERER_H_ | 6 #define CHROME_BROWSER_UI_SEARCH_INSTANT_SEARCH_PRERENDERER_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "base/macros.h" | 10 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
| 11 #include "chrome/common/instant_types.h" | 12 #include "chrome/common/instant_types.h" |
| 12 #include "content/public/browser/navigation_controller.h" | 13 #include "content/public/browser/navigation_controller.h" |
| 13 | 14 |
| 14 class GURL; | 15 class GURL; |
| 15 class Profile; | 16 class Profile; |
| 16 struct AutocompleteMatch; | 17 struct AutocompleteMatch; |
| 17 | 18 |
| 18 namespace chrome { | 19 namespace chrome { |
| 19 struct NavigateParams; | 20 struct NavigateParams; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 91 |
| 91 // Returns true if the |query| matches the last prefetched search query or if | 92 // Returns true if the |query| matches the last prefetched search query or if |
| 92 // the 'reuse_instant_search_base_page' flag is enabled in the field trials. | 93 // the 'reuse_instant_search_base_page' flag is enabled in the field trials. |
| 93 bool QueryMatchesPrefetch(const base::string16& query) const; | 94 bool QueryMatchesPrefetch(const base::string16& query) const; |
| 94 | 95 |
| 95 Profile* const profile_; | 96 Profile* const profile_; |
| 96 | 97 |
| 97 // Instant search base page URL. | 98 // Instant search base page URL. |
| 98 const GURL prerender_url_; | 99 const GURL prerender_url_; |
| 99 | 100 |
| 100 scoped_ptr<prerender::PrerenderHandle> prerender_handle_; | 101 std::unique_ptr<prerender::PrerenderHandle> prerender_handle_; |
| 101 | 102 |
| 102 InstantSuggestion last_instant_suggestion_; | 103 InstantSuggestion last_instant_suggestion_; |
| 103 | 104 |
| 104 DISALLOW_COPY_AND_ASSIGN(InstantSearchPrerenderer); | 105 DISALLOW_COPY_AND_ASSIGN(InstantSearchPrerenderer); |
| 105 }; | 106 }; |
| 106 | 107 |
| 107 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_SEARCH_PRERENDERER_H_ | 108 #endif // CHROME_BROWSER_UI_SEARCH_INSTANT_SEARCH_PRERENDERER_H_ |
| OLD | NEW |