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 | 7 |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 13 matching lines...) Expand all Loading... |
24 class GtkThemeService; | 24 class GtkThemeService; |
25 class OmniboxEditModel; | 25 class OmniboxEditModel; |
26 class OmniboxPopupModel; | 26 class OmniboxPopupModel; |
27 class OmniboxView; | 27 class OmniboxView; |
28 class SkBitmap; | 28 class SkBitmap; |
29 | 29 |
30 namespace gfx { | 30 namespace gfx { |
31 class Image; | 31 class Image; |
32 } | 32 } |
33 | 33 |
34 namespace ui { | |
35 class GtkSignalRegistrar; | |
36 } | |
37 | |
38 class OmniboxPopupViewGtk : public OmniboxPopupView, | 34 class OmniboxPopupViewGtk : public OmniboxPopupView, |
39 public content::NotificationObserver { | 35 public content::NotificationObserver { |
40 public: | 36 public: |
41 OmniboxPopupViewGtk(const gfx::Font& font, | 37 OmniboxPopupViewGtk(const gfx::Font& font, |
42 OmniboxView* omnibox_view, | 38 OmniboxView* omnibox_view, |
43 OmniboxEditModel* edit_model, | 39 OmniboxEditModel* edit_model, |
44 GtkWidget* location_bar); | 40 GtkWidget* location_bar); |
45 virtual ~OmniboxPopupViewGtk(); | 41 virtual ~OmniboxPopupViewGtk(); |
46 | 42 |
47 // Overridden from OmniboxPopupView: | 43 // Overridden from OmniboxPopupView: |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 | 93 |
98 CHROMEGTK_CALLBACK_1(OmniboxPopupViewGtk, gboolean, HandleButtonPress, | 94 CHROMEGTK_CALLBACK_1(OmniboxPopupViewGtk, gboolean, HandleButtonPress, |
99 GdkEventButton*); | 95 GdkEventButton*); |
100 | 96 |
101 CHROMEGTK_CALLBACK_1(OmniboxPopupViewGtk, gboolean, HandleButtonRelease, | 97 CHROMEGTK_CALLBACK_1(OmniboxPopupViewGtk, gboolean, HandleButtonRelease, |
102 GdkEventButton*); | 98 GdkEventButton*); |
103 | 99 |
104 CHROMEGTK_CALLBACK_1(OmniboxPopupViewGtk, gboolean, HandleExpose, | 100 CHROMEGTK_CALLBACK_1(OmniboxPopupViewGtk, gboolean, HandleExpose, |
105 GdkEventExpose*); | 101 GdkEventExpose*); |
106 | 102 |
107 scoped_ptr<ui::GtkSignalRegistrar> signal_registrar_; | |
108 scoped_ptr<OmniboxPopupModel> model_; | 103 scoped_ptr<OmniboxPopupModel> model_; |
109 OmniboxView* omnibox_view_; | 104 OmniboxView* omnibox_view_; |
110 GtkWidget* location_bar_; | 105 GtkWidget* location_bar_; |
111 | 106 |
112 // Our popup window, which is the only widget used, and we paint it on our | 107 // Our popup window, which is the only widget used, and we paint it on our |
113 // own. This widget shouldn't be exposed outside of this class. | 108 // own. This widget shouldn't be exposed outside of this class. |
114 GtkWidget* window_; | 109 GtkWidget* window_; |
115 // The pango layout object created from the window, cached across exposes. | 110 // The pango layout object created from the window, cached across exposes. |
116 PangoLayout* layout_; | 111 PangoLayout* layout_; |
117 | 112 |
(...skipping 25 matching lines...) Expand all Loading... |
143 // erroneously ignore the next drag. | 138 // erroneously ignore the next drag. |
144 bool ignore_mouse_drag_; | 139 bool ignore_mouse_drag_; |
145 | 140 |
146 // Whether our popup is currently open / shown, or closed / hidden. | 141 // Whether our popup is currently open / shown, or closed / hidden. |
147 bool opened_; | 142 bool opened_; |
148 | 143 |
149 DISALLOW_COPY_AND_ASSIGN(OmniboxPopupViewGtk); | 144 DISALLOW_COPY_AND_ASSIGN(OmniboxPopupViewGtk); |
150 }; | 145 }; |
151 | 146 |
152 #endif // CHROME_BROWSER_UI_GTK_OMNIBOX_OMNIBOX_POPUP_VIEW_GTK_H_ | 147 #endif // CHROME_BROWSER_UI_GTK_OMNIBOX_OMNIBOX_POPUP_VIEW_GTK_H_ |
OLD | NEW |