Chromium Code Reviews| 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 999dd4696dc092bde778463b551e1086e0d9b12e..61c71e249650741ef712cf46d8edd1386a2eb4b4 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 needs by values. |
|
Ilya Sherman
2012/03/27 18:19:53
nit: "needs" -> "needed"
csharp
2012/03/27 19:02:45
Done.
|
| + 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_ |