Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(642)

Unified Diff: chrome/browser/ui/gtk/autofill/autofill_popup_view_gtk.h

Issue 9235072: Adding Mouse Support for new GTK Autofill (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Responding to comments Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/gtk/autofill/autofill_popup_view_gtk.h
diff --git a/chrome/browser/ui/gtk/autofill/autofill_popup_view_gtk.h b/chrome/browser/ui/gtk/autofill/autofill_popup_view_gtk.h
index 8e869874fe5d196614846cbd72f1aea214bafb0c..999dd4696dc092bde778463b551e1086e0d9b12e 100644
--- a/chrome/browser/ui/gtk/autofill/autofill_popup_view_gtk.h
+++ b/chrome/browser/ui/gtk/autofill/autofill_popup_view_gtk.h
@@ -17,26 +17,39 @@ namespace gfx {
class Rect;
}
+typedef struct _GdkEventButton GdkEventButton;
typedef struct _GdkEventExpose GdkEventExpose;
+typedef struct _GdkEventMotion GdkEventMotion;
typedef struct _GdkColor GdkColor;
typedef struct _GtkWidget GtkWidget;
class AutofillPopupViewGtk : public AutofillPopupView {
public:
- AutofillPopupViewGtk(content::WebContents* web_contents, GtkWidget* parent);
+ AutofillPopupViewGtk(content::WebContents* web_contents,
+ AutofillExternalDelegate* external_delegate,
+ GtkWidget* parent);
virtual ~AutofillPopupViewGtk();
+ protected:
// AutofillPopupView implementations.
- virtual void Hide() OVERRIDE;
virtual void ShowInternal() OVERRIDE;
+ virtual void HideInternal() OVERRIDE;
+ virtual void InvalidateRow(size_t row) OVERRIDE;
private:
+ CHROMEGTK_CALLBACK_1(AutofillPopupViewGtk, gboolean, HandleButtonRelease,
+ GdkEventButton*);
CHROMEGTK_CALLBACK_1(AutofillPopupViewGtk, gboolean, HandleExpose,
GdkEventExpose*);
+ CHROMEGTK_CALLBACK_1(AutofillPopupViewGtk, gboolean, HandleMotion,
+ GdkEventMotion*);
// Setup the pango layout to display the autofill results.
void SetupLayout(const gfx::Rect& window_rect, const GdkColor& text_color);
+ // Convert a y-coordinate to the closest line.
+ int LineFromY(int y);
+
GtkWidget* parent_; // Weak reference.
GtkWidget* window_; // Strong reference.
PangoLayout* layout_; // Strong reference
@@ -44,6 +57,9 @@ class AutofillPopupViewGtk : public AutofillPopupView {
// The height of each individual Autofill popup row.
int row_height_;
+
+ // The size of the popup.
+ gfx::Rect bounds_;
};
#endif // CHROME_BROWSER_UI_GTK_AUTOFILL_AUTOFILL_POPUP_VIEW_GTK_H_

Powered by Google App Engine
This is Rietveld 408576698