Chromium Code Reviews| 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_INSTANT_INSTANT_LOADER_H_ | 5 #ifndef CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ |
| 6 #define CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ | 6 #define CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 79 // Returns info about the last navigation by the Instant page. If the page | 79 // Returns info about the last navigation by the Instant page. If the page |
| 80 // hasn't navigated since the last Update(), the URL is empty. | 80 // hasn't navigated since the last Update(), the URL is empty. |
| 81 const history::HistoryAddPageArgs& last_navigation() const { | 81 const history::HistoryAddPageArgs& last_navigation() const { |
| 82 return last_navigation_; | 82 return last_navigation_; |
| 83 } | 83 } |
| 84 | 84 |
| 85 // Called by the history tab helper with information that it would have added | 85 // Called by the history tab helper with information that it would have added |
| 86 // to the history service had this WebContents not been used for Instant. | 86 // to the history service had this WebContents not been used for Instant. |
| 87 void DidNavigate(const history::HistoryAddPageArgs& add_page_args); | 87 void DidNavigate(const history::HistoryAddPageArgs& add_page_args); |
| 88 | 88 |
| 89 // Returns true if the loader is loading InstantLoader::kLocalOmniboxPopupURL. | |
|
samarth
2012/12/13 23:47:44
nit: s/InstantLoader/InstantController/
Shishir
2012/12/14 00:03:15
Done.
| |
| 90 bool IsUsingLocalPreview() const; | |
| 91 | |
| 89 // Calls through to methods of the same name on InstantClient. | 92 // Calls through to methods of the same name on InstantClient. |
| 90 void Update(const string16& text, | 93 void Update(const string16& text, |
| 91 size_t selection_start, | 94 size_t selection_start, |
| 92 size_t selection_end, | 95 size_t selection_end, |
| 93 bool verbatim); | 96 bool verbatim); |
| 94 void Submit(const string16& text); | 97 void Submit(const string16& text); |
| 95 void Cancel(const string16& text); | 98 void Cancel(const string16& text); |
| 96 void SetOmniboxBounds(const gfx::Rect& bounds); | 99 void SetOmniboxBounds(const gfx::Rect& bounds); |
| 97 void SendAutocompleteResults( | 100 void SendAutocompleteResults( |
| 98 const std::vector<InstantAutocompleteResult>& results); | 101 const std::vector<InstantAutocompleteResult>& results); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 141 bool is_pointer_down_from_activate_; | 144 bool is_pointer_down_from_activate_; |
| 142 history::HistoryAddPageArgs last_navigation_; | 145 history::HistoryAddPageArgs last_navigation_; |
| 143 | 146 |
| 144 // Used to get notifications about renderers coming and going. | 147 // Used to get notifications about renderers coming and going. |
| 145 content::NotificationRegistrar registrar_; | 148 content::NotificationRegistrar registrar_; |
| 146 | 149 |
| 147 DISALLOW_COPY_AND_ASSIGN(InstantLoader); | 150 DISALLOW_COPY_AND_ASSIGN(InstantLoader); |
| 148 }; | 151 }; |
| 149 | 152 |
| 150 #endif // CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ | 153 #endif // CHROME_BROWSER_INSTANT_INSTANT_LOADER_H_ |
| OLD | NEW |