summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/autocomplete/autocomplete_popup_gtk.h
blob: 08e003eb700c20e960699d5a87fc7032aa0a60c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
// source code is governed by a BSD-style license that can be found in the
// LICENSE file.

#ifndef CHROME_BROWSER_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_GTK_H_
#define CHROME_BROWSER_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_GTK_H_

#include "views/widget/widget_gtk.h"

class AutocompleteEditView;
class AutocompletePopupContentsView;

class AutocompletePopupGtk : public views::WidgetGtk {
 public:
  explicit AutocompletePopupGtk(AutocompletePopupContentsView* contents);
  virtual ~AutocompletePopupGtk();

  // Creates the popup and shows it for the first time. |edit_view| is the edit
  // that created us.
  void Init(AutocompleteEditView* edit_view, views::View* contents);

  // Shows the popup and moves it to the right position.
  void Show();

  // Returns true if the popup is open.
  bool IsOpen() const;

  // Returns true if the popup has been created.
  bool IsCreated() const;

  // Restack the popup window directly above the browser's toplevel window.
  void StackWindow();

 private:
  AutocompletePopupContentsView* contents_;
  AutocompleteEditView* edit_view_;

  DISALLOW_COPY_AND_ASSIGN(AutocompletePopupGtk);
};

#endif  // #ifndef CHROME_BROWSER_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_GTK_H_