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

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

Issue 10408070: Upgrade Seperator in New Autofill 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
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 GdkEventExpose*); 55 GdkEventExpose*);
56 CHROMEGTK_CALLBACK_1(AutofillPopupViewGtk, gboolean, HandleMotion, 56 CHROMEGTK_CALLBACK_1(AutofillPopupViewGtk, gboolean, HandleMotion,
57 GdkEventMotion*); 57 GdkEventMotion*);
58 58
59 // KeyboardListener implementation. 59 // KeyboardListener implementation.
60 virtual bool HandleKeyPressEvent(GdkEventKey* event) OVERRIDE; 60 virtual bool HandleKeyPressEvent(GdkEventKey* event) OVERRIDE;
61 61
62 // Setup the pango layout to display the autofill results. 62 // Setup the pango layout to display the autofill results.
63 void SetupLayout(const gfx::Rect& window_rect, const GdkColor& text_color); 63 void SetupLayout(const gfx::Rect& window_rect, const GdkColor& text_color);
64 64
65 // Draw the separator as the given |separator_rect|.
66 void DrawSeparator(cairo_t* cairo_context, const gfx::Rect& separator_rect);
67
68 // Draw the given autofill entry in |entry_rect|.
69 void DrawAutofillEntry(cairo_t* cairo_context,
70 size_t index,
71 int actual_content_height,
72 const gfx::Rect& entry_rect);
73
65 // Set the bounds of the popup to show, including the placement of it. 74 // Set the bounds of the popup to show, including the placement of it.
66 void SetBounds(); 75 void SetBounds();
67 76
68 // Get width of popup needed by values. 77 // Get width of popup needed by values.
69 int GetPopupRequiredWidth(); 78 int GetPopupRequiredWidth();
70 79
80 // Get height of popup needed by values.
81 int GetPopupRequiredHeight();
82
71 // Convert a y-coordinate to the closest line. 83 // Convert a y-coordinate to the closest line.
72 int LineFromY(int y); 84 int LineFromY(int y);
73 85
86 // Returns the rectangle containing the item at position |index| in the popup.
87 gfx::Rect GetRectForRow(size_t row, int width);
88
74 GtkWidget* parent_; // Weak reference. 89 GtkWidget* parent_; // Weak reference.
75 GtkWidget* window_; // Strong reference. 90 GtkWidget* window_; // Strong reference.
76 PangoLayout* layout_; // Strong reference 91 PangoLayout* layout_; // Strong reference
77 gfx::Font font_; 92 gfx::Font font_;
78 GtkThemeService* theme_service_; 93 GtkThemeService* theme_service_;
79 94
80 // The size of the popup. 95 // The size of the popup.
81 gfx::Rect bounds_; 96 gfx::Rect bounds_;
82 97
83 content::RenderViewHost* render_view_host_; // Weak reference. 98 content::RenderViewHost* render_view_host_; // Weak reference.
84 }; 99 };
85 100
86 #endif // CHROME_BROWSER_UI_GTK_AUTOFILL_AUTOFILL_POPUP_VIEW_GTK_H_ 101 #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