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

Side by Side Diff: ui/aura_shell/shell_tooltip_manager.h

Issue 8780001: aura: Make aura::TooltipClient completely static? (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged with upstream Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_AURA_SHELL_SHELL_TOOLTIP_MANAGER_H_ 5 #ifndef UI_AURA_SHELL_SHELL_TOOLTIP_MANAGER_H_
6 #define UI_AURA_SHELL_SHELL_TOOLTIP_MANAGER_H_ 6 #define UI_AURA_SHELL_SHELL_TOOLTIP_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
11 #include "base/timer.h" 11 #include "base/timer.h"
12 #include "ui/aura/client/tooltip_client.h" 12 #include "ui/aura/client/tooltip_client.h"
13 #include "ui/aura/event_filter.h" 13 #include "ui/aura/event_filter.h"
14 #include "ui/aura/window_observer.h" 14 #include "ui/aura/window_observer.h"
15 #include "ui/aura_shell/aura_shell_export.h" 15 #include "ui/aura_shell/aura_shell_export.h"
16 #include "ui/gfx/point.h" 16 #include "ui/gfx/point.h"
17 17
18 namespace aura { 18 namespace aura {
19 class KeyEvent; 19 class KeyEvent;
20 class MouseEvent; 20 class MouseEvent;
21 class TouchEvent; 21 class TouchEvent;
22 class Window; 22 class Window;
23 } 23 }
24 24
25 namespace aura_shell { 25 namespace aura_shell {
26 26
27 // ShellTooltipManager provides tooltip functionality for aura shell. 27 // ShellTooltipManager provides tooltip functionality for aura shell.
28 class AURA_SHELL_EXPORT ShellTooltipManager : public aura::TooltipClient, 28 class AURA_SHELL_EXPORT ShellTooltipManager : public aura::EventFilter,
29 public aura::EventFilter,
30 public aura::WindowObserver { 29 public aura::WindowObserver {
31 public: 30 public:
32 ShellTooltipManager(); 31 ShellTooltipManager();
33 virtual ~ShellTooltipManager(); 32 virtual ~ShellTooltipManager();
34 33
35 // Overridden from aura::TooltipClient. 34 // Updates the tooltip for window |target|.
36 void UpdateTooltip(aura::Window* target); 35 void UpdateTooltip(aura::Window* target);
37 36
38 // Overridden from aura::EventFilter. 37 // Overridden from aura::EventFilter.
39 virtual bool PreHandleKeyEvent(aura::Window* target, 38 virtual bool PreHandleKeyEvent(aura::Window* target,
40 aura::KeyEvent* event) OVERRIDE; 39 aura::KeyEvent* event) OVERRIDE;
41 virtual bool PreHandleMouseEvent(aura::Window* target, 40 virtual bool PreHandleMouseEvent(aura::Window* target,
42 aura::MouseEvent* event) OVERRIDE; 41 aura::MouseEvent* event) OVERRIDE;
43 virtual ui::TouchStatus PreHandleTouchEvent(aura::Window* target, 42 virtual ui::TouchStatus PreHandleTouchEvent(aura::Window* target,
44 aura::TouchEvent* event) OVERRIDE; 43 aura::TouchEvent* event) OVERRIDE;
45 44
(...skipping 16 matching lines...) Expand all
62 base::RepeatingTimer<ShellTooltipManager> tooltip_timer_; 61 base::RepeatingTimer<ShellTooltipManager> tooltip_timer_;
63 62
64 gfx::Point curr_mouse_loc_; 63 gfx::Point curr_mouse_loc_;
65 64
66 DISALLOW_COPY_AND_ASSIGN(ShellTooltipManager); 65 DISALLOW_COPY_AND_ASSIGN(ShellTooltipManager);
67 }; 66 };
68 67
69 } // namespace aura_shell 68 } // namespace aura_shell
70 69
71 #endif // UI_AURA_SHELL_SHELL_TOOLTIP_MANAGER_H_ 70 #endif // UI_AURA_SHELL_SHELL_TOOLTIP_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698