Chromium Code Reviews| Index: chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.h |
| diff --git a/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.h b/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.h |
| index 0b6d4b2889ee4d2dfcfe9d58f24c986e41bb57e5..7bb28a7dcdd4380bfa29b0d86767a4367f2d40cc 100644 |
| --- a/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.h |
| +++ b/chrome/browser/ui/gtk/omnibox/omnibox_popup_view_gtk.h |
| @@ -21,6 +21,7 @@ |
| #include "ui/base/window_open_disposition.h" |
| #include "ui/gfx/font.h" |
| +class AutocompleteResult; |
| class GtkThemeService; |
| class OmniboxEditModel; |
| class OmniboxPopupModel; |
| @@ -44,6 +45,9 @@ class OmniboxPopupViewGtk : public OmniboxPopupView, |
| GtkWidget* location_bar); |
| virtual ~OmniboxPopupViewGtk(); |
| + // Initializes the view. |
| + virtual void Init(); |
| + |
| // Overridden from OmniboxPopupView: |
| virtual bool IsOpen() const OVERRIDE; |
| virtual void InvalidateLine(size_t line) OVERRIDE; |
| @@ -57,6 +61,20 @@ class OmniboxPopupViewGtk : public OmniboxPopupView, |
| const content::NotificationSource& source, |
| const content::NotificationDetails& details) OVERRIDE; |
| + protected: |
| + // Convert a y-coordinate to the closest line / result. |
| + size_t LineFromY(int y); |
| + |
| + // Return a Rect for the space for a result line. This excludes the border, |
| + // but includes the padding. This is the area that is colored for a |
| + // selection. |
| + gfx::Rect GetRectForLine(size_t line, int width); |
| + |
| + // Returns the number of hidden matches at the top of the popup. This is |
| + // non-zero when a verbatim match like search-what-you-typed is present but |
| + // should not be shown. |
| + size_t GetHiddenMatchCount(); |
| + |
| private: |
| // Be friendly for unit tests. |
| friend class OmniboxPopupViewGtkTest; |
| @@ -70,15 +88,12 @@ class OmniboxPopupViewGtk : public OmniboxPopupView, |
| const GdkColor* url_color, |
| const std::string& prefix_text); |
| - void Show(size_t num_results); |
| - void Hide(); |
| + virtual void Show(size_t num_results); |
| + virtual void Hide(); |
| // Restack the popup window directly above the browser's toplevel window. |
| void StackWindow(); |
| - // Convert a y-coordinate to the closest line / result. |
| - size_t LineFromY(int y); |
| - |
| // Accept a line of the results, for example, when the user clicks a line. |
| void AcceptLine(size_t line, WindowOpenDisposition disposition); |
| @@ -92,6 +107,9 @@ class OmniboxPopupViewGtk : public OmniboxPopupView, |
| const AutocompleteMatch** match, |
| bool* is_selected_keyword); |
| + // Returns the current autocomplete result. |
| + virtual const AutocompleteResult& GetResult() const; |
|
Evan Stade
2013/08/15 01:05:12
should be protected rather than private
Jered
2013/08/15 16:08:49
Done.
|
| + |
| CHROMEGTK_CALLBACK_1(OmniboxPopupViewGtk, gboolean, HandleMotion, |
| GdkEventMotion*); |