summaryrefslogtreecommitdiffstats
path: root/views/widget/tooltip_manager_gtk.h
diff options
context:
space:
mode:
authorwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-21 18:17:35 +0000
committerwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-21 18:17:35 +0000
commit84ad47e975cb77a12881dc0c72053a22993950ca (patch)
tree343752188cf8571abc5533d9eb37efb1eab03ebd /views/widget/tooltip_manager_gtk.h
parent586cf35708db57b9013a12adc8d8513163e558de (diff)
downloadchromium_src-84ad47e975cb77a12881dc0c72053a22993950ca.zip
chromium_src-84ad47e975cb77a12881dc0c72053a22993950ca.tar.gz
chromium_src-84ad47e975cb77a12881dc0c72053a22993950ca.tar.bz2
Revert "views: Move widget/ directory to ui/views." properly.
Review URL: http://codereview.chromium.org/8562003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110960 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/widget/tooltip_manager_gtk.h')
-rw-r--r--views/widget/tooltip_manager_gtk.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/views/widget/tooltip_manager_gtk.h b/views/widget/tooltip_manager_gtk.h
new file mode 100644
index 0000000..8273425
--- /dev/null
+++ b/views/widget/tooltip_manager_gtk.h
@@ -0,0 +1,53 @@
+// Copyright (c) 2011 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 VIEWS_WIDGET_TOOLTIP_MANAGER_GTK_H_
+#define VIEWS_WIDGET_TOOLTIP_MANAGER_GTK_H_
+#pragma once
+
+#include <gtk/gtk.h>
+
+#include "ui/base/gtk/tooltip_window_gtk.h"
+#include "views/widget/tooltip_manager.h"
+
+namespace views {
+
+class NativeWidgetGtk;
+
+// TooltipManager implementation for Gtk.
+class TooltipManagerGtk : public TooltipManager {
+ public:
+ explicit TooltipManagerGtk(NativeWidgetGtk* widget);
+ virtual ~TooltipManagerGtk() {}
+
+ // Shows the tooltip at the specified location. Returns true if the tooltip
+ // should be shown, false otherwise.
+ bool ShowTooltip(int x, int y, bool for_keyboard, GtkTooltip* gtk_tooltip);
+
+ // TooltipManager.
+ virtual void UpdateTooltip();
+ virtual void TooltipTextChanged(View* view);
+ virtual void ShowKeyboardTooltip(View* view);
+ virtual void HideKeyboardTooltip();
+
+ private:
+ // Sends the show_help signal to widget_. This signal triggers showing the
+ // keyboard tooltip if it isn't showing, or hides it if it is showing.
+ bool SendShowHelpSignal();
+
+ // Our owner.
+ NativeWidgetGtk* widget_;
+
+ // The view supplied to the last invocation of ShowKeyboardTooltip.
+ View* keyboard_view_;
+
+ // Customized tooltip window.
+ ui::TooltipWindowGtk tooltip_window_;
+
+ DISALLOW_COPY_AND_ASSIGN(TooltipManagerGtk);
+};
+
+} // namespace views
+
+#endif // VIEWS_WIDGET_TOOLTIP_MANAGER_GTK_H_