summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/gtk/autofill/autofill_popup_view_gtk.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ui/gtk/autofill/autofill_popup_view_gtk.h')
-rw-r--r--chrome/browser/ui/gtk/autofill/autofill_popup_view_gtk.h17
1 files changed, 16 insertions, 1 deletions
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 999dd46..3fb7f53 100644
--- a/chrome/browser/ui/gtk/autofill/autofill_popup_view_gtk.h
+++ b/chrome/browser/ui/gtk/autofill/autofill_popup_view_gtk.h
@@ -9,21 +9,28 @@
#include <pango/pango.h>
#include "chrome/browser/autofill/autofill_popup_view.h"
+#include "content/public/browser/keyboard_listener.h"
#include "ui/base/glib/glib_integers.h"
#include "ui/base/gtk/gtk_signal.h"
#include "ui/gfx/font.h"
+namespace content {
+class RenderViewHost;
+}
+
namespace gfx {
class Rect;
}
typedef struct _GdkEventButton GdkEventButton;
typedef struct _GdkEventExpose GdkEventExpose;
+typedef struct _GdkEventKey GdkEventKey;
typedef struct _GdkEventMotion GdkEventMotion;
typedef struct _GdkColor GdkColor;
typedef struct _GtkWidget GtkWidget;
-class AutofillPopupViewGtk : public AutofillPopupView {
+class AutofillPopupViewGtk : public AutofillPopupView,
+ public KeyboardListener {
public:
AutofillPopupViewGtk(content::WebContents* web_contents,
AutofillExternalDelegate* external_delegate,
@@ -44,9 +51,15 @@ class AutofillPopupViewGtk : public AutofillPopupView {
CHROMEGTK_CALLBACK_1(AutofillPopupViewGtk, gboolean, HandleMotion,
GdkEventMotion*);
+ // KeyboardListener implementation.
+ virtual bool HandleKeyPressEvent(GdkEventKey* event) OVERRIDE;
+
// Setup the pango layout to display the autofill results.
void SetupLayout(const gfx::Rect& window_rect, const GdkColor& text_color);
+ // Get width of popup needed by values.
+ int GetPopupRequiredWidth();
+
// Convert a y-coordinate to the closest line.
int LineFromY(int y);
@@ -60,6 +73,8 @@ class AutofillPopupViewGtk : public AutofillPopupView {
// The size of the popup.
gfx::Rect bounds_;
+
+ content::RenderViewHost* render_view_host_; // Weak reference.
};
#endif // CHROME_BROWSER_UI_GTK_AUTOFILL_AUTOFILL_POPUP_VIEW_GTK_H_