view_(NULL),
delegate_(delegate),
text_direction_(text_direction),
- hide_on_outside_click_(false),
weak_ptr_factory_(this) {
ClearState();
controller_common_->SetKeyPressCallback(
int available_width = popup_width - RowWidthWithoutText(i);
- // Each field recieves space in proportion to its length.
+ // Each field receives space in proportion to its length.
int name_size = available_width * name_width / total_text_length;
names_[i] = gfx::ElideText(names_[i],
GetNameFontListForRow(i),
UpdateBoundsAndRedrawPopup();
}
- delegate_->OnPopupShown();
controller_common_->RegisterKeyPressCallback();
+ delegate_->OnPopupShown();
}
void AutofillPopupControllerImpl::UpdateDataListValues(
void AutofillPopupControllerImpl::Hide() {
controller_common_->RemoveKeyPressCallback();
- if (delegate_.get())
+ if (delegate_)
delegate_->OnPopupHidden();
if (view_)
SetSelectedLine(kNoSelection);
}
-bool AutofillPopupControllerImpl::ShouldRepostEvent(
- const ui::MouseEvent& event) {
- return delegate_->ShouldRepostEvent(event);
-}
-
-bool AutofillPopupControllerImpl::ShouldHideOnOutsideClick() const {
- return hide_on_outside_click_;
-}
-
void AutofillPopupControllerImpl::AcceptSuggestion(size_t index) {
delegate_->DidAcceptSuggestion(full_names_[index], identifiers_[index]);
}
return selected_line_;
}
-void AutofillPopupControllerImpl::set_hide_on_outside_click(
- bool hide_on_outside_click) {
- hide_on_outside_click_ = hide_on_outside_click;
-}
-
void AutofillPopupControllerImpl::SetSelectedLine(int selected_line) {
if (selected_line_ == selected_line)
return;