Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / views / autofill / autofill_dialog_views.h
index 5b0d8e3..e84a880 100644 (file)
@@ -48,6 +48,7 @@ class Widget;
 
 namespace ui {
 class ComboboxModel;
+class EventHandler;
 class KeyEvent;
 }
 
@@ -89,8 +90,6 @@ class AutofillDialogViews : public AutofillDialogView,
   virtual void GetUserInput(DialogSection section,
                             FieldValueMap* output) OVERRIDE;
   virtual base::string16 GetCvc() OVERRIDE;
-  virtual bool HitTestInput(ServerFieldType type,
-                            const gfx::Point& screen_point) OVERRIDE;
   virtual bool SaveDetailsLocally() OVERRIDE;
   virtual const content::NavigationController* ShowSignIn() OVERRIDE;
   virtual void HideSignIn() OVERRIDE;
@@ -124,6 +123,7 @@ class AutofillDialogViews : public AutofillDialogView,
 
   // views::WidgetObserver implementation:
   virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE;
+  virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE;
   virtual void OnWidgetBoundsChanged(views::Widget* widget,
                                      const gfx::Rect& new_bounds) OVERRIDE;
 
@@ -375,8 +375,7 @@ class AutofillDialogViews : public AutofillDialogView,
     DISALLOW_COPY_AND_ASSIGN(DetailsContainerView);
   };
 
-  // A view that contains a suggestion (such as a known address) and a link to
-  // edit the suggestion.
+  // A view that contains a suggestion (such as a known address).
   class SuggestionView : public views::View {
    public:
     explicit SuggestionView(AutofillDialogViews* autofill_dialog);
@@ -429,8 +428,6 @@ class AutofillDialogViews : public AutofillDialogView,
     views::ImageView* icon_;
     // The input set by ShowTextfield.
     ExpandingTextfield* textfield_;
-    // An "Edit" link that flips to editable inputs rather than suggestion text.
-    views::Link* edit_link_;
 
     DISALLOW_COPY_AND_ASSIGN(SuggestionView);
   };
@@ -586,6 +583,9 @@ class AutofillDialogViews : public AutofillDialogView,
   // state.
   void SetEditabilityForSection(DialogSection section);
 
+  // Handles mouse presses on the non-client view.
+  void NonClientMousePressed();
+
   // The delegate that drives this view. Weak pointer, always non-NULL.
   AutofillDialogViewDelegate* const delegate_;
 
@@ -673,6 +673,9 @@ class AutofillDialogViews : public AutofillDialogView,
   // Delegate for the sign-in dialog's webview.
   scoped_ptr<AutofillDialogSignInDelegate> sign_in_delegate_;
 
+  // Used to tell the delegate when focus moves to hide the Autofill popup.
+  scoped_ptr<ui::EventHandler> event_handler_;
+
   DISALLOW_COPY_AND_ASSIGN(AutofillDialogViews);
 };