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

Unified Diff: chrome/browser/autocomplete/autocomplete_edit.h

Issue 6685002: Wires up ability for page to specify instant auto complete (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit test and stray char Created 9 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autocomplete/autocomplete_edit.h
diff --git a/chrome/browser/autocomplete/autocomplete_edit.h b/chrome/browser/autocomplete/autocomplete_edit.h
index 2ea41b8b4cbe1111020bbe6470b72ad590a42e90..29bbb17e6387778b66e457ab550ae9c18c6ac9dc 100644
--- a/chrome/browser/autocomplete/autocomplete_edit.h
+++ b/chrome/browser/autocomplete/autocomplete_edit.h
@@ -10,6 +10,7 @@
#include "base/string16.h"
#include "chrome/browser/autocomplete/autocomplete_controller_delegate.h"
#include "chrome/browser/autocomplete/autocomplete_match.h"
+#include "chrome/common/instant_types.h"
#include "chrome/common/page_transition_types.h"
#include "googleurl/src/gurl.h"
#include "ui/gfx/native_widget_types.h"
@@ -191,7 +192,8 @@ class AutocompleteEditModel : public AutocompleteControllerDelegate {
bool skip_inline_autocomplete);
// Sets the suggestion text.
- void SetSuggestedText(const string16& text);
+ void SetSuggestedText(const string16& text,
+ InstantCompleteBehavior behavior);
// Commits the suggested text. If |skip_inline_autocomplete| is true then the
// suggested text will be committed as final text as if it's inputted by the
@@ -333,6 +335,12 @@ class AutocompleteEditModel : public AutocompleteControllerDelegate {
// Invoked when the popup is going to change its bounds to |bounds|.
void PopupBoundsChangedTo(const gfx::Rect& bounds);
+#if defined(UNIT_TEST)
+ InstantCompleteBehavior instant_complete_behavior() const {
+ return instant_complete_behavior_;
+ }
+#endif
+
private:
enum PasteState {
NONE, // Most recent edit was not a paste.
@@ -523,6 +531,9 @@ class AutocompleteEditModel : public AutocompleteControllerDelegate {
// happening.
bool update_instant_;
+ // Last value of InstantCompleteBehavior supplied to |SetSuggestedText|.
+ InstantCompleteBehavior instant_complete_behavior_;
+
DISALLOW_COPY_AND_ASSIGN(AutocompleteEditModel);
};
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_edit.cc » ('j') | chrome/browser/autocomplete/autocomplete_edit.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698