Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / autofill / autofill_popup_controller_impl.cc
index 4e6c6a0..96f125d 100644 (file)
@@ -102,7 +102,6 @@ AutofillPopupControllerImpl::AutofillPopupControllerImpl(
       view_(NULL),
       delegate_(delegate),
       text_direction_(text_direction),
-      hide_on_outside_click_(false),
       weak_ptr_factory_(this) {
   ClearState();
   controller_common_->SetKeyPressCallback(
@@ -148,7 +147,7 @@ void AutofillPopupControllerImpl::Show(
 
     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),
@@ -178,8 +177,8 @@ void AutofillPopupControllerImpl::Show(
     UpdateBoundsAndRedrawPopup();
   }
 
-  delegate_->OnPopupShown();
   controller_common_->RegisterKeyPressCallback();
+  delegate_->OnPopupShown();
 }
 
 void AutofillPopupControllerImpl::UpdateDataListValues(
@@ -236,7 +235,7 @@ void AutofillPopupControllerImpl::UpdateDataListValues(
 
 void AutofillPopupControllerImpl::Hide() {
   controller_common_->RemoveKeyPressCallback();
-  if (delegate_.get())
+  if (delegate_)
     delegate_->OnPopupHidden();
 
   if (view_)
@@ -320,15 +319,6 @@ void AutofillPopupControllerImpl::SelectionCleared() {
   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]);
 }
@@ -428,11 +418,6 @@ int AutofillPopupControllerImpl::selected_line() const {
   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;