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

Side by Side Diff: ui/views/widget/tooltip_manager_aura.h

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 months 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 unified diff | Download patch
« no previous file with comments | « ui/views/widget/tooltip_manager.cc ('k') | ui/views/widget/tooltip_manager_aura.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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 UI_VIEWS_WIDGET_TOOLTIP_MANAGER_AURA_H_
6 #define UI_VIEWS_WIDGET_TOOLTIP_MANAGER_AURA_H_
7
8 #include "base/compiler_specific.h"
9 #include "base/strings/string16.h"
10 #include "ui/gfx/point.h"
11 #include "ui/views/widget/tooltip_manager.h"
12
13 namespace aura {
14 class Window;
15 }
16
17 namespace gfx {
18 class FontList;
19 }
20
21 namespace views {
22
23 class Widget;
24
25 // TooltipManager implementation for Aura.
26 class TooltipManagerAura : public TooltipManager {
27 public:
28 explicit TooltipManagerAura(Widget* widget);
29 virtual ~TooltipManagerAura();
30
31 // If |source| has capture this finds the Widget under the mouse and invokes
32 // UpdateTooltip() on it's TooltipManager. This is necessary as when capture
33 // is held mouse events are only delivered to the Window that has capture even
34 // though we may show tooltips for the Window under the mouse.
35 static void UpdateTooltipManagerForCapture(Widget* source);
36
37 // Returns the FontList used by all TooltipManagerAuras.
38 static const gfx::FontList& GetDefaultFontList();
39
40 // TooltipManager:
41 virtual const gfx::FontList& GetFontList() const override;
42 virtual void UpdateTooltip() override;
43 virtual void TooltipTextChanged(View* view) override;
44
45 private:
46 View* GetViewUnderPoint(const gfx::Point& point);
47 void UpdateTooltipForTarget(View* target,
48 const gfx::Point& point,
49 aura::Window* root_window);
50
51 // Returns the Window the tooltip text is installed on.
52 aura::Window* GetWindow();
53
54 Widget* widget_;
55 base::string16 tooltip_text_;
56
57 DISALLOW_COPY_AND_ASSIGN(TooltipManagerAura);
58 };
59
60 } // namespace views
61
62 #endif // UI_VIEWS_WIDGET_TOOLTIP_MANAGER_AURA_H_
OLDNEW
« no previous file with comments | « ui/views/widget/tooltip_manager.cc ('k') | ui/views/widget/tooltip_manager_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698