Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Side by Side Diff: chrome/browser/instant/instant_controller.h

Issue 10809063: Adding Javascript support for the Extended Searchbox API. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Adding missing file from last upload. Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_
6 #define CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ 6 #define CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // Returns whether the preview will be committed when the mouse or touch 121 // Returns whether the preview will be committed when the mouse or touch
122 // pointer is released. 122 // pointer is released.
123 bool commit_on_pointer_release() const; 123 bool commit_on_pointer_release() const;
124 124
125 // Returns the transition type of the last AutocompleteMatch passed to Update. 125 // Returns the transition type of the last AutocompleteMatch passed to Update.
126 content::PageTransition last_transition_type() const { 126 content::PageTransition last_transition_type() const {
127 return last_transition_type_; 127 return last_transition_type_;
128 } 128 }
129 129
130 // InstantLoaderDelegate: 130 // InstantLoaderDelegate:
131 virtual void SetSuggestions(InstantLoader* loader, 131 virtual void SetSuggestions(
132 const std::vector<string16>& suggestions, 132 InstantLoader* loader,
133 InstantCompleteBehavior behavior) OVERRIDE; 133 const std::vector<InstantSuggestion>& suggestions) OVERRIDE;
134 virtual void CommitInstantLoader(InstantLoader* loader) OVERRIDE; 134 virtual void CommitInstantLoader(InstantLoader* loader) OVERRIDE;
135 virtual void InstantLoaderPreviewLoaded(InstantLoader* loader) OVERRIDE; 135 virtual void InstantLoaderPreviewLoaded(InstantLoader* loader) OVERRIDE;
136 virtual void InstantSupportDetermined(InstantLoader* loader, 136 virtual void InstantSupportDetermined(InstantLoader* loader,
137 bool supports_instant) OVERRIDE; 137 bool supports_instant) OVERRIDE;
138 virtual void SwappedTabContents(InstantLoader* loader) OVERRIDE; 138 virtual void SwappedTabContents(InstantLoader* loader) OVERRIDE;
139 virtual void InstantLoaderContentsFocused(InstantLoader* loader) OVERRIDE; 139 virtual void InstantLoaderContentsFocused(InstantLoader* loader) OVERRIDE;
140 140
141 #if defined(UNIT_TEST) 141 #if defined(UNIT_TEST)
142 // Accessors used only in tests. 142 // Accessors used only in tests.
143 bool is_showing() const { return is_showing_; } 143 bool is_showing() const { return is_showing_; }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 string16 last_user_text_; 192 string16 last_user_text_;
193 193
194 // The most recent verbatim passed to Update(). 194 // The most recent verbatim passed to Update().
195 bool last_verbatim_; 195 bool last_verbatim_;
196 196
197 // The most recent suggestion received from the page, minus any prefix that 197 // The most recent suggestion received from the page, minus any prefix that
198 // the user has typed. 198 // the user has typed.
199 string16 last_suggestion_; 199 string16 last_suggestion_;
200 200
201 // The most recent autocomplete behavior for |last_suggestion_|. 201 // The most recent autocomplete behavior for |last_suggestion_|.
202 InstantCompleteBehavior last_complete_behavior_; 202 InstantCompleteBehavior last_complete_behavior_;
sreeram 2012/08/09 22:13:51 You can replace these two with: InstantSuggestio
Shishir 2012/08/10 18:16:57 Done.
203 203
204 // See comments on the getter above. 204 // See comments on the getter above.
205 content::PageTransition last_transition_type_; 205 content::PageTransition last_transition_type_;
206 206
207 // True if the preview is currently being displayed. Guaranteed to be false 207 // True if the preview is currently being displayed. Guaranteed to be false
208 // if IsOutOfDate() is true. 208 // if IsOutOfDate() is true.
209 bool is_showing_; 209 bool is_showing_;
210 210
211 // True if we've received a response from the loader for the last Update(), 211 // True if we've received a response from the loader for the last Update(),
212 // thus indicating that the page is ready to be shown. 212 // thus indicating that the page is ready to be shown.
(...skipping 18 matching lines...) Expand all
231 // Search terms extraction (for autocomplete history matches) doesn't work 231 // Search terms extraction (for autocomplete history matches) doesn't work
232 // on Instant URLs. So, whenever the user commits an Instant search, we add 232 // on Instant URLs. So, whenever the user commits an Instant search, we add
233 // an equivalent non-Instant search URL to history, so that the search shows 233 // an equivalent non-Instant search URL to history, so that the search shows
234 // up in autocomplete history matches. 234 // up in autocomplete history matches.
235 GURL url_for_history_; 235 GURL url_for_history_;
236 236
237 DISALLOW_COPY_AND_ASSIGN(InstantController); 237 DISALLOW_COPY_AND_ASSIGN(InstantController);
238 }; 238 };
239 239
240 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_ 240 #endif // CHROME_BROWSER_INSTANT_INSTANT_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/instant/instant_controller.cc » ('j') | chrome/browser/instant/instant_loader_delegate.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698