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 3// found in the LICENSE file. 4 5#ifndef CHROME_BROWSER_UI_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_GTK_H_ 6#define CHROME_BROWSER_UI_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_GTK_H_ 7#pragma once 8 9#include "base/memory/weak_ptr.h" 10#include "views/widget/widget_gtk.h" 11 12class AutocompletePopupGtk 13 : public views::WidgetGtk, 14 public base::SupportsWeakPtr<AutocompletePopupGtk> { 15 public: 16 // Creates the popup and shows it. |edit_view| is the edit that created us. 17 AutocompletePopupGtk(); 18 virtual ~AutocompletePopupGtk(); 19 20 // Returns the window the popup should be relative to. |edit_native_view| is 21 // the native view of the autocomplete edit. 22 gfx::NativeView GetRelativeWindowForPopup( 23 gfx::NativeView edit_native_view) const; 24 25 private: 26 DISALLOW_COPY_AND_ASSIGN(AutocompletePopupGtk); 27}; 28 29#endif // CHROME_BROWSER_UI_VIEWS_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_GTK_H_ 30