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

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

Issue 9187009: Basic Drawn text for new GTK Autofill popup. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Responding to Comments Created 8 years, 11 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 d45b0a4c2a014075f9dc04c68d461cb13dae780b..8891976da8b885586c0d4fb338acd4af28dadea0 100644
--- a/chrome/browser/ui/gtk/autofill/autofill_popup_view_gtk.h
+++ b/chrome/browser/ui/gtk/autofill/autofill_popup_view_gtk.h
@@ -8,31 +8,35 @@
#include <gtk/gtk.h>
Ilya Sherman 2012/01/20 07:26:47 nit: Just noticed -- can the GTK classes be forwar
csharp 2012/01/20 16:20:44 I don't think they can, I tried and ran into error
Elliot Glaysher 2012/01/20 18:43:59 So: typedef struct _GdkEventExpose GdkEventExpose
csharp 2012/01/20 21:20:01 Oops, they do. I was just using class GtkWidget. U
-#include "base/string16.h"
#include "chrome/browser/autofill/autofill_popup_view.h"
#include "ui/base/gtk/gtk_signal.h"
Ilya Sherman 2012/01/20 07:26:47 Ditto
csharp 2012/01/20 16:20:44 This is needed to include the define for CHROMEGTK
-
-#include <vector>
+#include "ui/gfx/font.h"
+#include "ui/gfx/rect.h"
Ilya Sherman 2012/01/20 07:26:47 nit: Ditto (for rect.h; font.h clearly needs to be
csharp 2012/01/20 16:20:44 Done.
class AutofillPopupViewGtk : public AutofillPopupView {
public:
- AutofillPopupViewGtk(content::WebContents* web_contents, GtkWidget* parent);
+ AutofillPopupViewGtk(content::WebContents* web_contents,
+ GtkWidget* parent);
Ilya Sherman 2012/01/20 07:26:47 nit: If this still fits on one line, no need to wr
csharp 2012/01/20 16:20:44 Done. I just forget to clean this up after removin
virtual ~AutofillPopupViewGtk();
// AutofillPopupView implementations.
virtual void Hide() OVERRIDE;
- virtual void Show(const std::vector<string16>& autofill_values,
- const std::vector<string16>& autofill_labels,
- const std::vector<string16>& autofill_icons,
- const std::vector<int>& autofill_unique_ids,
- int separator_index) OVERRIDE;
+ virtual void ShowInternal() OVERRIDE;
private:
CHROMEGTK_CALLBACK_1(AutofillPopupViewGtk, gboolean, HandleExpose,
GdkEventExpose*);
+ // Setup the pango layout to display the autofill results.
+ void SetupLayout(const gfx::Rect& window_rect, const GdkColor& text_color);
+
GtkWidget* parent_; // Weak reference.
- GtkWidget* window_; // Strong refence.
+ GtkWidget* window_; // Strong reference.
+ PangoLayout* layout_; // Strong reference
+ gfx::Font font_;
+
+ // The height of each individual Autofill popup row.
+ int row_height_;
};
#endif // CHROME_BROWSER_UI_GTK_AUTOFILL_AUTOFILL_POPUP_VIEW_GTK_H_

Powered by Google App Engine
This is Rietveld 408576698