| 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_OMNIBOX_OMNIBOX_POPUP_VIEW_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_OMNIBOX_OMNIBOX_POPUP_VIEW_GTK_H_ |
| 6 #define CHROME_BROWSER_UI_GTK_OMNIBOX_OMNIBOX_POPUP_VIEW_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_OMNIBOX_OMNIBOX_POPUP_VIEW_GTK_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
| 10 | 10 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 72 |
| 73 // Restack the popup window directly above the browser's toplevel window. | 73 // Restack the popup window directly above the browser's toplevel window. |
| 74 void StackWindow(); | 74 void StackWindow(); |
| 75 | 75 |
| 76 // Convert a y-coordinate to the closest line / result. | 76 // Convert a y-coordinate to the closest line / result. |
| 77 size_t LineFromY(int y); | 77 size_t LineFromY(int y); |
| 78 | 78 |
| 79 // Accept a line of the results, for example, when the user clicks a line. | 79 // Accept a line of the results, for example, when the user clicks a line. |
| 80 void AcceptLine(size_t line, WindowOpenDisposition disposition); | 80 void AcceptLine(size_t line, WindowOpenDisposition disposition); |
| 81 | 81 |
| 82 const gfx::Image* IconForMatch(const AutocompleteMatch& match, bool selected); | 82 const gfx::Image* IconForMatch(const AutocompleteMatch& match, |
| 83 bool selected, |
| 84 bool is_selected_keyword); |
| 85 |
| 86 // Returns the |index|th element of match, unless we're selected and showing |
| 87 // the associated keyword match. |
| 88 void GetVisibleMatchForInput(size_t index, |
| 89 const AutocompleteMatch** match, |
| 90 bool* is_selected_keyword); |
| 83 | 91 |
| 84 CHROMEGTK_CALLBACK_1(OmniboxPopupViewGtk, gboolean, HandleMotion, | 92 CHROMEGTK_CALLBACK_1(OmniboxPopupViewGtk, gboolean, HandleMotion, |
| 85 GdkEventMotion*); | 93 GdkEventMotion*); |
| 86 | 94 |
| 87 CHROMEGTK_CALLBACK_1(OmniboxPopupViewGtk, gboolean, HandleButtonPress, | 95 CHROMEGTK_CALLBACK_1(OmniboxPopupViewGtk, gboolean, HandleButtonPress, |
| 88 GdkEventButton*); | 96 GdkEventButton*); |
| 89 | 97 |
| 90 CHROMEGTK_CALLBACK_1(OmniboxPopupViewGtk, gboolean, HandleButtonRelease, | 98 CHROMEGTK_CALLBACK_1(OmniboxPopupViewGtk, gboolean, HandleButtonRelease, |
| 91 GdkEventButton*); | 99 GdkEventButton*); |
| 92 | 100 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 // erroneously ignore the next drag. | 144 // erroneously ignore the next drag. |
| 137 bool ignore_mouse_drag_; | 145 bool ignore_mouse_drag_; |
| 138 | 146 |
| 139 // Whether our popup is currently open / shown, or closed / hidden. | 147 // Whether our popup is currently open / shown, or closed / hidden. |
| 140 bool opened_; | 148 bool opened_; |
| 141 | 149 |
| 142 DISALLOW_COPY_AND_ASSIGN(OmniboxPopupViewGtk); | 150 DISALLOW_COPY_AND_ASSIGN(OmniboxPopupViewGtk); |
| 143 }; | 151 }; |
| 144 | 152 |
| 145 #endif // CHROME_BROWSER_UI_GTK_OMNIBOX_OMNIBOX_POPUP_VIEW_GTK_H_ | 153 #endif // CHROME_BROWSER_UI_GTK_OMNIBOX_OMNIBOX_POPUP_VIEW_GTK_H_ |
| OLD | NEW |