summaryrefslogtreecommitdiffstats
path: root/views/examples
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-14 16:47:26 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-14 16:47:26 +0000
commitbb5276425eba1ae57a0eb120c6caf6d689d7f935 (patch)
tree471ac45b1999005695a046517ae21e33a1a63be5 /views/examples
parentf1a5a90c6b5edd54b239fd15eac71fbbc153ec97 (diff)
downloadchromium_src-bb5276425eba1ae57a0eb120c6caf6d689d7f935.zip
chromium_src-bb5276425eba1ae57a0eb120c6caf6d689d7f935.tar.gz
chromium_src-bb5276425eba1ae57a0eb120c6caf6d689d7f935.tar.bz2
Reworks autocomplete result set processing by the edit/model necessitated by my last change (only one result set vs 2). There is now one notification when the results change. The edit is the sole listener and updates the popup after it does some processing.
My last change broke keyword state when switching tabs. This is because of the change I did to AutocompleteEditModel::SetUserText, specifically: keyword_.clear(); is_keyword_hint_ = false; When you restore a tab we end up in void AutocompleteEditModel::RestoreState(const State& state) { ... keyword_ = state.keyword; is_keyword_hint_ = state.is_keyword_hint; view_->SetUserText(state.user_text, DisplayTextFromUserText(state.user_text), false); Which ends up back in SetUserText and we because of my change the keyword is effectively chucked. I added the code to clear out the keyword because of the change of notifications. Specifically because AutocompletePopupModel::Observe is now notified before AutocompleteEditModel::Observe yet it expects the AutocompleteEditModel to have been updated. Additionally I need to update the keyword_ and keyword_hint_ immediately in the edit if the results go empty. This mirrors what the old code was doing. BUG=72022 TEST=covered by tests Review URL: http://codereview.chromium.org/6484015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74823 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/examples')
0 files changed, 0 insertions, 0 deletions