Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Unified Diff: ui/views/widget/tooltip_manager_views.h

Issue 8747022: Aura: Tooltips (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moved test_tooltip_client to ui/views/test Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/widget/tooltip_manager_aura.cc ('k') | ui/views/widget/tooltip_manager_views.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/tooltip_manager_views.h
diff --git a/ui/views/widget/tooltip_manager_views.h b/ui/views/widget/tooltip_manager_views.h
deleted file mode 100644
index e844ddfe4daa535a0abcaa2d5baacd2b55812cd0..0000000000000000000000000000000000000000
--- a/ui/views/widget/tooltip_manager_views.h
+++ /dev/null
@@ -1,80 +0,0 @@
-// 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 UI_VIEWS_WIDGET_TOOLTIP_MANAGER_VIEWS_H_
-#define UI_VIEWS_WIDGET_TOOLTIP_MANAGER_VIEWS_H_
-#pragma once
-
-#include "base/message_loop.h"
-#include "base/timer.h"
-#include "ui/views/controls/label.h"
-#include "ui/views/widget/native_widget.h"
-#include "ui/views/widget/tooltip_manager.h"
-#include "ui/views/widget/widget_delegate.h"
-#include "views/view.h"
-
-#if defined(USE_X11)
-typedef union _XEvent XEvent;
-#endif
-
-namespace views {
-
-class MouseEvent;
-class Widget;
-
-// TooltipManager implementation for Views.
-class TooltipManagerViews : public TooltipManager {
- public:
- explicit TooltipManagerViews(views::View* root_view);
- virtual ~TooltipManagerViews();
-
- // Updates the state of the tooltip based on the mouse event. The mouse event
- // is the same event that goes to a Widget (i.e. it is in the Widget's
- // coordinate system).
- void UpdateForMouseEvent(const MouseEvent& event);
-
- // TooltipManager.
- virtual void UpdateTooltip() OVERRIDE;
- virtual void TooltipTextChanged(View* view) OVERRIDE;
- virtual void ShowKeyboardTooltip(View* view) OVERRIDE;
- virtual void HideKeyboardTooltip() OVERRIDE;
-
- private:
- void TooltipTimerFired();
- View* GetViewForTooltip(int x, int y, bool for_keyboard);
-
- // Updates the tooltip if required (if there is any change in the tooltip
- // text or the view.
- void UpdateIfRequired(int x, int y, bool for_keyboard);
-
- // Updates the tooltip. Gets the tooltip text from tooltip_view_ and displays
- // it at the current mouse position.
- void Update();
-
- // Adjusts the bounds given by the arguments to fit inside the parent view
- // and applies the adjusted bounds to the tooltip_label_.
- void SetTooltipBounds(gfx::Point mouse_pos, int tooltip_width,
- int tooltip_height);
-
- // Creates a widget of type TYPE_TOOLTIP
- Widget* CreateTooltip();
-
- // Invoked when the mose moves.
- void OnMouseMoved(int x, int y);
-
- scoped_ptr<Widget> tooltip_widget_;
- views::View* root_view_;
- View* tooltip_view_;
- string16 tooltip_text_;
- Label tooltip_label_;
-
- gfx::Point curr_mouse_pos_;
- base::RepeatingTimer<TooltipManagerViews> tooltip_timer_;
-
- DISALLOW_COPY_AND_ASSIGN(TooltipManagerViews);
-};
-
-} // namespace views
-
-#endif // UI_VIEWS_WIDGET_TOOLTIP_MANAGER_VIEWS_H_
« no previous file with comments | « ui/views/widget/tooltip_manager_aura.cc ('k') | ui/views/widget/tooltip_manager_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698