Index: chrome/browser/predictors/autocomplete_action_predictor.h |
diff --git a/chrome/browser/predictors/autocomplete_action_predictor.h b/chrome/browser/predictors/autocomplete_action_predictor.h |
index d78ced9642cbded32e20036f250000872da9697c..34a725af3ad4d06f21bae0cf0c34c4d61f500502 100644 |
--- a/chrome/browser/predictors/autocomplete_action_predictor.h |
+++ b/chrome/browser/predictors/autocomplete_action_predictor.h |
@@ -9,6 +9,7 @@ |
#include "base/gtest_prod_util.h" |
#include "base/memory/ref_counted.h" |
+#include "base/memory/scoped_ptr.h" |
#include "base/memory/weak_ptr.h" |
#include "base/string16.h" |
#include "chrome/browser/history/history_types.h" |
@@ -25,10 +26,22 @@ class HistoryService; |
class PredictorsHandler; |
class Profile; |
+namespace content { |
+class SessionStorageNamespace; |
+} |
+ |
+namespace gfx { |
+class Size; |
+} |
+ |
namespace history { |
class URLDatabase; |
} |
+namespace prerender { |
+class PrerenderHandle; |
+} |
+ |
namespace predictors { |
// This class is responsible for determining the correct predictive network |
@@ -78,6 +91,15 @@ class AutocompleteActionPredictor |
Action RecommendAction(const string16& user_text, |
const AutocompleteMatch& match) const; |
+ // Begin prerendering |url| with |session_storage_namespace|. The |size| gives |
+ // the initial size for the target prerender. The predictor will run at most |
+ // one prerender at a time, so launching a prerender will cancel our previous |
+ // prerenders (if any). |
+ void StartPrerendering( |
+ const GURL& url, |
+ content::SessionStorageNamespace* session_storage_namespace, |
+ const gfx::Size& size); |
+ |
// Return true if the suggestion type warrants a TCP/IP preconnection. |
// i.e., it is now quite likely that the user will select the related domain. |
static bool IsPreconnectable(const AutocompleteMatch& match); |
@@ -198,6 +220,8 @@ class AutocompleteActionPredictor |
// This is cleared after every Omnibox navigation. |
std::vector<TransitionalMatch> transitional_matches_; |
+ scoped_ptr<prerender::PrerenderHandle> prerender_handle_; |
+ |
// This allows us to predict the effect of confidence threshold changes on |
// accuracy. This is cleared after every omnibox navigation. |
mutable std::vector<std::pair<GURL, double> > tracked_urls_; |