| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
| 2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
| 3 // LICENSE file. | 3 // LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_GTK_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_GTK_H_ |
| 6 #define CHROME_BROWSER_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_GTK_H_ | 6 #define CHROME_BROWSER_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_GTK_H_ |
| 7 | 7 |
| 8 #include "views/widget/widget_gtk.h" | 8 #include "views/widget/widget_gtk.h" |
| 9 | 9 |
| 10 class AutocompleteEditView; | 10 class AutocompleteEditView; |
| 11 class AutocompletePopupContentsView; | 11 class AutocompletePopupContentsView; |
| 12 | 12 |
| 13 class AutocompletePopupGtk : public views::WidgetGtk { | 13 class AutocompletePopupGtk : public views::WidgetGtk { |
| 14 public: | 14 public: |
| 15 explicit AutocompletePopupGtk(AutocompletePopupContentsView* contents); | 15 // Creates the popup and shows it. |edit_view| is the edit that created us. |
| 16 AutocompletePopupGtk(AutocompleteEditView* edit_view, |
| 17 AutocompletePopupContentsView* contents); |
| 16 virtual ~AutocompletePopupGtk(); | 18 virtual ~AutocompletePopupGtk(); |
| 17 | 19 |
| 18 // Overridden from WidgetWin: | |
| 19 virtual void Show(); | |
| 20 virtual void Hide(); | |
| 21 | |
| 22 // Creates the popup and shows it for the first time. |edit_view| is the edit | |
| 23 // that created us. | |
| 24 void Init(AutocompleteEditView* edit_view, views::View* contents); | |
| 25 | |
| 26 // Returns true if the popup is open. | |
| 27 bool IsOpen() const; | |
| 28 | |
| 29 // Returns true if the popup has been created. | |
| 30 bool IsCreated() const; | |
| 31 | |
| 32 private: | 20 private: |
| 33 // Restack the popup window directly above the browser's toplevel window. | |
| 34 void StackWindow(); | |
| 35 | |
| 36 AutocompletePopupContentsView* contents_; | |
| 37 AutocompleteEditView* edit_view_; | |
| 38 | |
| 39 bool is_open_; // Used only for sanity-checking. | |
| 40 | |
| 41 DISALLOW_COPY_AND_ASSIGN(AutocompletePopupGtk); | 21 DISALLOW_COPY_AND_ASSIGN(AutocompletePopupGtk); |
| 42 }; | 22 }; |
| 43 | 23 |
| 44 #endif // #ifndef CHROME_BROWSER_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_GTK_H_ | 24 #endif // #ifndef CHROME_BROWSER_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_GTK_H_ |
| OLD | NEW |