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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_GTK_AUTOFILL_AUTOFILL_POPUP_VIEW_GTK_H_ 5 #ifndef CHROME_BROWSER_UI_GTK_AUTOFILL_AUTOFILL_POPUP_VIEW_GTK_H_
6 #define CHROME_BROWSER_UI_GTK_AUTOFILL_AUTOFILL_POPUP_VIEW_GTK_H_ 6 #define CHROME_BROWSER_UI_GTK_AUTOFILL_AUTOFILL_POPUP_VIEW_GTK_H_
7 #pragma once 7 #pragma once
8 8
9 #include <gtk/gtk.h> 9 #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
10 10
11 #include "base/string16.h"
12 #include "chrome/browser/autofill/autofill_popup_view.h" 11 #include "chrome/browser/autofill/autofill_popup_view.h"
13 #include "ui/base/gtk/gtk_signal.h" 12 #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
14 13 #include "ui/gfx/font.h"
15 #include <vector> 14 #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.
16 15
17 class AutofillPopupViewGtk : public AutofillPopupView { 16 class AutofillPopupViewGtk : public AutofillPopupView {
18 public: 17 public:
19 AutofillPopupViewGtk(content::WebContents* web_contents, GtkWidget* parent); 18 AutofillPopupViewGtk(content::WebContents* web_contents,
19 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
20 virtual ~AutofillPopupViewGtk(); 20 virtual ~AutofillPopupViewGtk();
21 21
22 // AutofillPopupView implementations. 22 // AutofillPopupView implementations.
23 virtual void Hide() OVERRIDE; 23 virtual void Hide() OVERRIDE;
24 virtual void Show(const std::vector<string16>& autofill_values, 24 virtual void ShowInternal() OVERRIDE;
25 const std::vector<string16>& autofill_labels,
26 const std::vector<string16>& autofill_icons,
27 const std::vector<int>& autofill_unique_ids,
28 int separator_index) OVERRIDE;
29 25
30 private: 26 private:
31 CHROMEGTK_CALLBACK_1(AutofillPopupViewGtk, gboolean, HandleExpose, 27 CHROMEGTK_CALLBACK_1(AutofillPopupViewGtk, gboolean, HandleExpose,
32 GdkEventExpose*); 28 GdkEventExpose*);
33 29
30 // Setup the pango layout to display the autofill results.
31 void SetupLayout(const gfx::Rect& window_rect, const GdkColor& text_color);
32
34 GtkWidget* parent_; // Weak reference. 33 GtkWidget* parent_; // Weak reference.
35 GtkWidget* window_; // Strong refence. 34 GtkWidget* window_; // Strong reference.
35 PangoLayout* layout_; // Strong reference
36 gfx::Font font_;
37
38 // The height of each individual Autofill popup row.
39 int row_height_;
36 }; 40 };
37 41
38 #endif // CHROME_BROWSER_UI_GTK_AUTOFILL_AUTOFILL_POPUP_VIEW_GTK_H_ 42 #endif // CHROME_BROWSER_UI_GTK_AUTOFILL_AUTOFILL_POPUP_VIEW_GTK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698