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