| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 |
| 11 #include <map> | 11 #include <map> |
| 12 #include <string> | 12 #include <string> |
| 13 | 13 |
| 14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "chrome/browser/autocomplete/autocomplete_match.h" | 16 #include "chrome/browser/autocomplete/autocomplete_match.h" |
| 17 #include "chrome/browser/autocomplete/autocomplete_popup_view.h" | 17 #include "chrome/browser/autocomplete/autocomplete_popup_view.h" |
| 18 #include "content/common/notification_observer.h" | 18 #include "content/common/notification_observer.h" |
| 19 #include "content/common/notification_registrar.h" | 19 #include "content/common/notification_registrar.h" |
| 20 #include "ui/base/gtk/gtk_signal.h" | 20 #include "ui/base/gtk/gtk_signal.h" |
| 21 #include "ui/gfx/font.h" | 21 #include "ui/gfx/font.h" |
| 22 #include "webkit/glue/window_open_disposition.h" | 22 #include "webkit/glue/window_open_disposition.h" |
| 23 | 23 |
| 24 class AutocompleteEditModel; | 24 class AutocompleteEditModel; |
| 25 class AutocompletePopupModel; | 25 class AutocompletePopupModel; |
| 26 class GtkThemeService; | 26 class GtkThemeService; |
| 27 class OmniboxView; | 27 class OmniboxView; |
| 28 class Profile; | |
| 29 class SkBitmap; | 28 class SkBitmap; |
| 30 | 29 |
| 31 class OmniboxPopupViewGtk : public AutocompletePopupView, | 30 class OmniboxPopupViewGtk : public AutocompletePopupView, |
| 32 public NotificationObserver { | 31 public NotificationObserver { |
| 33 public: | 32 public: |
| 34 OmniboxPopupViewGtk(const gfx::Font& font, | 33 OmniboxPopupViewGtk(const gfx::Font& font, |
| 35 OmniboxView* omnibox_view, | 34 OmniboxView* omnibox_view, |
| 36 AutocompleteEditModel* edit_model, | 35 AutocompleteEditModel* edit_model, |
| 37 Profile* profile, | |
| 38 GtkWidget* location_bar); | 36 GtkWidget* location_bar); |
| 39 virtual ~OmniboxPopupViewGtk(); | 37 virtual ~OmniboxPopupViewGtk(); |
| 40 | 38 |
| 41 // Overridden from AutocompletePopupView: | 39 // Overridden from AutocompletePopupView: |
| 42 virtual bool IsOpen() const; | 40 virtual bool IsOpen() const; |
| 43 virtual void InvalidateLine(size_t line); | 41 virtual void InvalidateLine(size_t line); |
| 44 virtual void UpdatePopupAppearance(); | 42 virtual void UpdatePopupAppearance(); |
| 45 virtual gfx::Rect GetTargetBounds(); | 43 virtual gfx::Rect GetTargetBounds(); |
| 46 virtual void PaintUpdatesNow(); | 44 virtual void PaintUpdatesNow(); |
| 47 virtual void OnDragCanceled(); | 45 virtual void OnDragCanceled(); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 // erroneously ignore the next drag. | 131 // erroneously ignore the next drag. |
| 134 bool ignore_mouse_drag_; | 132 bool ignore_mouse_drag_; |
| 135 | 133 |
| 136 // Whether our popup is currently open / shown, or closed / hidden. | 134 // Whether our popup is currently open / shown, or closed / hidden. |
| 137 bool opened_; | 135 bool opened_; |
| 138 | 136 |
| 139 DISALLOW_COPY_AND_ASSIGN(OmniboxPopupViewGtk); | 137 DISALLOW_COPY_AND_ASSIGN(OmniboxPopupViewGtk); |
| 140 }; | 138 }; |
| 141 | 139 |
| 142 #endif // CHROME_BROWSER_UI_GTK_OMNIBOX_OMNIBOX_POPUP_VIEW_GTK_H_ | 140 #endif // CHROME_BROWSER_UI_GTK_OMNIBOX_OMNIBOX_POPUP_VIEW_GTK_H_ |
| OLD | NEW |