summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/autocomplete_edit.cc
diff options
context:
space:
mode:
authorpkasting@google.com <pkasting@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-28 17:20:26 +0000
committerpkasting@google.com <pkasting@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-28 17:20:26 +0000
commit7ec93dfb306b62e48cdf2498f4a2b5074074969a (patch)
treeaeebf066a7bf48f1f7f41ae622f036d25c861bc3 /chrome/browser/autocomplete/autocomplete_edit.cc
parentff677bcb3e08bb8be774ca69f1dd961b8c8eb490 (diff)
downloadchromium_src-7ec93dfb306b62e48cdf2498f4a2b5074074969a.zip
chromium_src-7ec93dfb306b62e48cdf2498f4a2b5074074969a.tar.gz
chromium_src-7ec93dfb306b62e48cdf2498f4a2b5074074969a.tar.bz2
Split the AutocompletePopup into model and view classes, step 1.
The just adds "Model" and "View" to the end of the current classname, leaves everything in the same files, and doesn't really change or remove any functionality, creation order, ownership semantics, etc. In other words, it's basically just moving some code around to get things split into two classes, and the harder work comes later. Also removes/trims some overly long comments, fixes a couple comment errors I noticed, and trims one or two bits of logic to be shorter. What really needs review the most is the high-level decisions about how to split data and functionality between the two classes. BUG=1343512 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1492 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/autocomplete_edit.cc')
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit.cc b/chrome/browser/autocomplete/autocomplete_edit.cc
index ca18895..4c06a1c 100644
--- a/chrome/browser/autocomplete/autocomplete_edit.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit.cc
@@ -125,7 +125,7 @@ AutocompleteEdit::AutocompleteEdit(const ChromeFont& font,
bool popup_window_mode)
: controller_(controller),
model_(model),
- popup_(new AutocompletePopup(font, this, profile)),
+ popup_(new AutocompletePopupModel(font, this, profile)),
popup_window_mode_(popup_window_mode),
has_focus_(false),
user_input_in_progress_(false),
@@ -455,7 +455,7 @@ void AutocompleteEdit::AcceptInput(WindowOpenDisposition disposition,
}
OpenURL(url, disposition, transition, alternate_nav_url,
- AutocompletePopup::kNoMatch,
+ AutocompletePopupModel::kNoMatch,
is_keyword_hint_ ? std::wstring() : keyword_);
}
@@ -2139,7 +2139,7 @@ void AutocompleteEdit::PasteAndGo() {
// enough of an edge case that we ignore this possibility.
RevertAll();
OpenURL(paste_and_go_url_, CURRENT_TAB, paste_and_go_transition_,
- paste_and_go_alternate_nav_url_, AutocompletePopup::kNoMatch,
+ paste_and_go_alternate_nav_url_, AutocompletePopupModel::kNoMatch,
std::wstring());
}
@@ -2157,7 +2157,7 @@ void AutocompleteEdit::SendOpenNotification(size_t selected_line,
// open).
if (popup_->is_open()) {
scoped_ptr<AutocompleteLog> log(popup_->GetAutocompleteLog());
- if (selected_line != AutocompletePopup::kNoMatch)
+ if (selected_line != AutocompletePopupModel::kNoMatch)
log->selected_index = selected_line;
else if (!has_temporary_text_)
log->inline_autocompleted_length = inline_autocomplete_text_.length();