OLD | NEW |
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 | 7 |
8 #include <pango/pango.h> | 8 #include <pango/pango.h> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 CHROMEGTK_CALLBACK_1(AutofillPopupViewGtk, gboolean, HandleButtonRelease, | 51 CHROMEGTK_CALLBACK_1(AutofillPopupViewGtk, gboolean, HandleButtonRelease, |
52 GdkEventButton*); | 52 GdkEventButton*); |
53 CHROMEGTK_CALLBACK_1(AutofillPopupViewGtk, gboolean, HandleExpose, | 53 CHROMEGTK_CALLBACK_1(AutofillPopupViewGtk, gboolean, HandleExpose, |
54 GdkEventExpose*); | 54 GdkEventExpose*); |
55 CHROMEGTK_CALLBACK_1(AutofillPopupViewGtk, gboolean, HandleLeave, | 55 CHROMEGTK_CALLBACK_1(AutofillPopupViewGtk, gboolean, HandleLeave, |
56 GdkEventCrossing*) | 56 GdkEventCrossing*) |
57 CHROMEGTK_CALLBACK_1(AutofillPopupViewGtk, gboolean, HandleMotion, | 57 CHROMEGTK_CALLBACK_1(AutofillPopupViewGtk, gboolean, HandleMotion, |
58 GdkEventMotion*); | 58 GdkEventMotion*); |
59 | 59 |
60 // Set up the pango layout to display the autofill results. | 60 // Set up the pango layout to display the autofill results. |
61 void SetupLayout(const gfx::Rect& window_rect); | 61 void SetUpLayout(); |
62 | 62 |
63 // Set up the pango layout to print the given text and have it's width match | 63 // Set up the pango layout to print the given text and have it's width match |
64 // the text's (this gives us better control when placing the text box). | 64 // the text's (this gives us better control when placing the text box). |
65 void SetLayoutText(const string16& text, | 65 void SetLayoutText(const string16& text, |
66 const gfx::Font& font, | 66 const gfx::Font& font, |
67 const GdkColor text_color); | 67 const GdkColor text_color); |
68 | 68 |
69 // Draw the separator as the given |separator_rect|. | 69 // Draw the separator as the given |separator_rect|. |
70 void DrawSeparator(cairo_t* cairo_context, const gfx::Rect& separator_rect); | 70 void DrawSeparator(cairo_t* cairo_context, const gfx::Rect& separator_rect); |
71 | 71 |
72 // Draw the given autofill entry in |entry_rect|. | 72 // Draw the given autofill entry in |entry_rect|. |
73 void DrawAutofillEntry(cairo_t* cairo_context, | 73 void DrawAutofillEntry(cairo_t* cairo_context, |
74 size_t index, | 74 size_t index, |
75 const gfx::Rect& entry_rect); | 75 const gfx::Rect& entry_rect); |
76 | 76 |
77 // Set the initial bounds of the popup to show, including the placement | 77 // Set the initial bounds of the popup to show, including the placement |
78 // of it. | 78 // of it. |
79 void SetInitialBounds(); | 79 void SetInitialBounds(); |
80 | 80 |
81 AutofillPopupController* controller_; // Weak reference. | 81 AutofillPopupController* controller_; // Weak reference. |
82 | 82 |
83 GtkWidget* window_; // Strong reference. | 83 GtkWidget* window_; // Strong reference. |
84 PangoLayout* layout_; // Strong reference. | 84 PangoLayout* layout_; // Strong reference. |
85 | 85 |
86 DISALLOW_COPY_AND_ASSIGN(AutofillPopupViewGtk); | 86 DISALLOW_COPY_AND_ASSIGN(AutofillPopupViewGtk); |
87 }; | 87 }; |
88 | 88 |
89 #endif // CHROME_BROWSER_UI_GTK_AUTOFILL_AUTOFILL_POPUP_VIEW_GTK_H_ | 89 #endif // CHROME_BROWSER_UI_GTK_AUTOFILL_AUTOFILL_POPUP_VIEW_GTK_H_ |
OLD | NEW |