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

Side by Side Diff: chrome/browser/ui/gtk/autofill/autofill_popup_view_gtk.h

Issue 10396003: Add Icon Support for New Autofill Gtk UI (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 7 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
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 <pango/pango.h> 9 #include <pango/pango.h>
10 10
11 #include "chrome/browser/autofill/autofill_popup_view.h" 11 #include "chrome/browser/autofill/autofill_popup_view.h"
12 #include "content/public/browser/keyboard_listener.h" 12 #include "content/public/browser/keyboard_listener.h"
13 #include "ui/base/glib/glib_integers.h" 13 #include "ui/base/glib/glib_integers.h"
14 #include "ui/base/gtk/gtk_signal.h" 14 #include "ui/base/gtk/gtk_signal.h"
15 #include "ui/gfx/font.h" 15 #include "ui/gfx/font.h"
16 16
17 class GtkThemeService;
18 class Profile;
19
17 namespace content { 20 namespace content {
18 class RenderViewHost; 21 class RenderViewHost;
19 } 22 }
20 23
21 namespace gfx { 24 namespace gfx {
22 class Rect; 25 class Rect;
23 } 26 }
24 27
25 typedef struct _GdkEventButton GdkEventButton; 28 typedef struct _GdkEventButton GdkEventButton;
26 typedef struct _GdkEventExpose GdkEventExpose; 29 typedef struct _GdkEventExpose GdkEventExpose;
27 typedef struct _GdkEventKey GdkEventKey; 30 typedef struct _GdkEventKey GdkEventKey;
28 typedef struct _GdkEventMotion GdkEventMotion; 31 typedef struct _GdkEventMotion GdkEventMotion;
29 typedef struct _GdkColor GdkColor; 32 typedef struct _GdkColor GdkColor;
30 typedef struct _GtkWidget GtkWidget; 33 typedef struct _GtkWidget GtkWidget;
31 34
32 class AutofillPopupViewGtk : public AutofillPopupView, 35 class AutofillPopupViewGtk : public AutofillPopupView,
33 public KeyboardListener { 36 public KeyboardListener {
34 public: 37 public:
35 AutofillPopupViewGtk(content::WebContents* web_contents, 38 AutofillPopupViewGtk(content::WebContents* web_contents,
39 GtkThemeService* theme_service,
36 AutofillExternalDelegate* external_delegate, 40 AutofillExternalDelegate* external_delegate,
37 GtkWidget* parent); 41 GtkWidget* parent);
38 virtual ~AutofillPopupViewGtk(); 42 virtual ~AutofillPopupViewGtk();
39 43
40 protected: 44 protected:
41 // AutofillPopupView implementations. 45 // AutofillPopupView implementations.
42 virtual void ShowInternal() OVERRIDE; 46 virtual void ShowInternal() OVERRIDE;
43 virtual void HideInternal() OVERRIDE; 47 virtual void HideInternal() OVERRIDE;
44 virtual void InvalidateRow(size_t row) OVERRIDE; 48 virtual void InvalidateRow(size_t row) OVERRIDE;
45 virtual void ResizePopup() OVERRIDE; 49 virtual void ResizePopup() OVERRIDE;
(...skipping 18 matching lines...) Expand all
64 // Get width of popup needed by values. 68 // Get width of popup needed by values.
65 int GetPopupRequiredWidth(); 69 int GetPopupRequiredWidth();
66 70
67 // Convert a y-coordinate to the closest line. 71 // Convert a y-coordinate to the closest line.
68 int LineFromY(int y); 72 int LineFromY(int y);
69 73
70 GtkWidget* parent_; // Weak reference. 74 GtkWidget* parent_; // Weak reference.
71 GtkWidget* window_; // Strong reference. 75 GtkWidget* window_; // Strong reference.
72 PangoLayout* layout_; // Strong reference 76 PangoLayout* layout_; // Strong reference
73 gfx::Font font_; 77 gfx::Font font_;
74 78 GtkThemeService* theme_service_;
75 // The height of each individual Autofill popup row.
76 int row_height_;
77 79
78 // The size of the popup. 80 // The size of the popup.
79 gfx::Rect bounds_; 81 gfx::Rect bounds_;
80 82
81 content::RenderViewHost* render_view_host_; // Weak reference. 83 content::RenderViewHost* render_view_host_; // Weak reference.
82 }; 84 };
83 85
84 #endif // CHROME_BROWSER_UI_GTK_AUTOFILL_AUTOFILL_POPUP_VIEW_GTK_H_ 86 #endif // CHROME_BROWSER_UI_GTK_AUTOFILL_AUTOFILL_POPUP_VIEW_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/autofill/autofill_popup_view.cc ('k') | chrome/browser/ui/gtk/autofill/autofill_popup_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698