Chromium Code Reviews| Index: chrome/browser/instant/instant_controller.h |
| diff --git a/chrome/browser/instant/instant_controller.h b/chrome/browser/instant/instant_controller.h |
| index 436f9866560268177df9731e72a553709fb0e405..b26a72bf3f0bd595abe03b1a07421a8d52eb62b6 100644 |
| --- a/chrome/browser/instant/instant_controller.h |
| +++ b/chrome/browser/instant/instant_controller.h |
| @@ -26,6 +26,7 @@ |
| struct AutocompleteMatch; |
| class AutocompleteProvider; |
| +class InstantClient; |
| class InstantLoader; |
| class TabContents; |
| class TemplateURL; |
| @@ -115,7 +116,7 @@ class InstantController { |
| const InstantModel* model() const { return &model_; } |
| // Invoked by InstantLoader when it has suggested text. |
|
Jered
2012/11/27 19:21:57
InstantLoader -> client
sreeram
2012/11/29 07:33:19
Done.
|
| - void SetSuggestions(InstantLoader* loader, |
| + void SetSuggestions(InstantClient* client, |
| const std::vector<InstantSuggestion>& suggestions); |
| // Invoked by InstantLoader to commit the preview. |
| @@ -129,7 +130,7 @@ class InstantController { |
| // Invoked by InstantLoader when it has determined whether or not the page |
|
Jered
2012/11/27 19:21:57
InstantLoader -> client
sreeram
2012/11/29 07:33:19
Done.
|
| // supports the Instant API. |
| - void InstantSupportDetermined(InstantLoader* loader, bool supports_instant); |
| + void InstantSupportDetermined(InstantClient* client, bool supports_instant); |
| // Invoked by InstantLoader when it has swapped a different TabContents into |
| // the preview, usually because a prerendered page was navigated to. |
| @@ -147,6 +148,8 @@ class InstantController { |
| private: |
| FRIEND_TEST_ALL_PREFIXES(InstantTest, InstantLoaderRefresh); |
| + void ResetClient(); |
| + |
| // Creates a new loader if necessary, using the instant_url property of the |
| // |template_url| (for example, if the Instant URL has changed since the last |
| // time the loader was created). Returns false if the |template_url| doesn't |
| @@ -186,6 +189,8 @@ class InstantController { |
| bool GetInstantURL(const TemplateURL* template_url, |
| std::string* instant_url) const; |
| + InstantClient* CurrentClient() const; |
| + |
| chrome::BrowserInstantController* const browser_; |
| // Whether the extended API and regular API are enabled. If both are false, |
| @@ -195,6 +200,7 @@ class InstantController { |
| InstantModel model_; |
|
samarth
2012/11/27 18:09:43
Worth clarifying somewhere that model_ only reflec
sreeram
2012/11/29 07:33:19
Done.
|
| + scoped_ptr<InstantClient> client_; |
|
sky
2012/11/27 01:07:51
Since InstantLoader is also an InstantClient using
sreeram
2012/11/29 07:33:19
Done.
|
| scoped_ptr<InstantLoader> loader_; |
|
Jered
2012/11/27 19:21:57
It feels funny to me that InstantController owns c
sreeram
2012/11/29 07:33:19
Ack. As per previous comments, I've kept the owner
|
| // The most recent user_text passed to Update(). |