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

Unified Diff: chrome/browser/ui/omnibox/omnibox_edit_model.h

Issue 232023004: Ensures the autocomplete_controller input is saved and restored when changing tabs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed broken browser test. Created 6 years, 8 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
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_controller.cc ('k') | chrome/browser/ui/omnibox/omnibox_edit_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/omnibox/omnibox_edit_model.h
diff --git a/chrome/browser/ui/omnibox/omnibox_edit_model.h b/chrome/browser/ui/omnibox/omnibox_edit_model.h
index 8927a04cb2eb45ce5711f3c13be29fcb06ef6697..6550c4092a0216182f25d449be9442fd476fd496 100644
--- a/chrome/browser/ui/omnibox/omnibox_edit_model.h
+++ b/chrome/browser/ui/omnibox/omnibox_edit_model.h
@@ -11,6 +11,7 @@
#include "base/strings/string16.h"
#include "base/time/time.h"
#include "chrome/browser/autocomplete/autocomplete_controller_delegate.h"
+#include "chrome/browser/autocomplete/autocomplete_input.h"
#include "chrome/browser/autocomplete/autocomplete_match.h"
#include "chrome/browser/ui/omnibox/omnibox_controller.h"
#include "chrome/common/instant_types.h"
@@ -60,7 +61,8 @@ class OmniboxEditModel {
bool is_keyword_hint,
bool url_replacement_enabled,
OmniboxFocusState focus_state,
- FocusSource focus_source);
+ FocusSource focus_source,
+ const AutocompleteInput& autocomplete_input);
~State();
bool user_input_in_progress;
@@ -71,6 +73,7 @@ class OmniboxEditModel {
bool url_replacement_enabled;
OmniboxFocusState focus_state;
FocusSource focus_source;
+ const AutocompleteInput autocomplete_input;
};
OmniboxEditModel(OmniboxView* view,
@@ -171,7 +174,7 @@ class OmniboxEditModel {
// Directs the popup to start autocomplete.
void StartAutocomplete(bool has_selected_text,
- bool prevent_inline_autocomplete) const;
+ bool prevent_inline_autocomplete);
// Closes the popup and cancels any pending asynchronous queries.
void StopAutocomplete();
@@ -551,6 +554,11 @@ class OmniboxEditModel {
// This has no effect if we're already in keyword mode.
bool allow_exact_keyword_match_;
+ // The input that was sent to the AutocompleteController. Since no
+ // autocomplete query is started after a tab switch, it is possible for this
+ // |input_| to differ from the one currently stored in AutocompleteController.
+ AutocompleteInput input_;
+
DISALLOW_COPY_AND_ASSIGN(OmniboxEditModel);
};
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_controller.cc ('k') | chrome/browser/ui/omnibox/omnibox_edit_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698