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

Side by Side Diff: ash/shelf/shelf_tooltip_manager.h

Issue 2158273003: mus: Rename .*PointerWatcher.* to .*PointerDownWatcher.*. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 5 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 | « ash/pointer_watcher_delegate_aura.cc ('k') | ash/shelf/shelf_tooltip_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 ASH_SHELF_SHELF_TOOLTIP_MANAGER_H_ 5 #ifndef ASH_SHELF_SHELF_TOOLTIP_MANAGER_H_
6 #define ASH_SHELF_SHELF_TOOLTIP_MANAGER_H_ 6 #define ASH_SHELF_SHELF_TOOLTIP_MANAGER_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/shelf/shelf_layout_manager_observer.h" 9 #include "ash/shelf/shelf_layout_manager_observer.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "base/timer/timer.h" 12 #include "base/timer/timer.h"
13 #include "ui/aura/window_observer.h" 13 #include "ui/aura/window_observer.h"
14 #include "ui/events/event_handler.h" 14 #include "ui/events/event_handler.h"
15 #include "ui/views/pointer_watcher.h" 15 #include "ui/views/pointer_down_watcher.h"
16 16
17 namespace views { 17 namespace views {
18 class BubbleDialogDelegateView; 18 class BubbleDialogDelegateView;
19 class View; 19 class View;
20 } 20 }
21 21
22 namespace ash { 22 namespace ash {
23 class ShelfLayoutManager; 23 class ShelfLayoutManager;
24 class ShelfView; 24 class ShelfView;
25 25
26 namespace test { 26 namespace test {
27 class ShelfTooltipManagerTest; 27 class ShelfTooltipManagerTest;
28 class ShelfViewTest; 28 class ShelfViewTest;
29 } 29 }
30 30
31 // ShelfTooltipManager manages the tooltip bubble that appears for shelf items. 31 // ShelfTooltipManager manages the tooltip bubble that appears for shelf items.
32 class ASH_EXPORT ShelfTooltipManager : public ui::EventHandler, 32 class ASH_EXPORT ShelfTooltipManager : public ui::EventHandler,
33 public aura::WindowObserver, 33 public aura::WindowObserver,
34 public views::PointerWatcher, 34 public views::PointerDownWatcher,
35 public ShelfLayoutManagerObserver { 35 public ShelfLayoutManagerObserver {
36 public: 36 public:
37 explicit ShelfTooltipManager(ShelfView* shelf_view); 37 explicit ShelfTooltipManager(ShelfView* shelf_view);
38 ~ShelfTooltipManager() override; 38 ~ShelfTooltipManager() override;
39 39
40 // Initializes the tooltip manager once the shelf is shown. 40 // Initializes the tooltip manager once the shelf is shown.
41 void Init(); 41 void Init();
42 42
43 // Closes the tooltip. 43 // Closes the tooltip.
44 void Close(); 44 void Close();
(...skipping 11 matching lines...) Expand all
56 // Set the timer delay in ms for testing. 56 // Set the timer delay in ms for testing.
57 void set_timer_delay_for_test(int timer_delay) { timer_delay_ = timer_delay; } 57 void set_timer_delay_for_test(int timer_delay) { timer_delay_ = timer_delay; }
58 58
59 protected: 59 protected:
60 // ui::EventHandler overrides: 60 // ui::EventHandler overrides:
61 void OnEvent(ui::Event* event) override; 61 void OnEvent(ui::Event* event) override;
62 62
63 // aura::WindowObserver overrides: 63 // aura::WindowObserver overrides:
64 void OnWindowDestroying(aura::Window* window) override; 64 void OnWindowDestroying(aura::Window* window) override;
65 65
66 // views::PointerWatcher overrides: 66 // views::PointerDownWatcher overrides:
67 void OnMousePressed(const ui::MouseEvent& event, 67 void OnMousePressed(const ui::MouseEvent& event,
68 const gfx::Point& location_in_screen, 68 const gfx::Point& location_in_screen,
69 views::Widget* target) override; 69 views::Widget* target) override;
70 void OnTouchPressed(const ui::TouchEvent& event, 70 void OnTouchPressed(const ui::TouchEvent& event,
71 const gfx::Point& location_in_screen, 71 const gfx::Point& location_in_screen,
72 views::Widget* target) override; 72 views::Widget* target) override;
73 73
74 // ShelfLayoutManagerObserver overrides: 74 // ShelfLayoutManagerObserver overrides:
75 void WillDeleteShelfLayoutManager() override; 75 void WillDeleteShelfLayoutManager() override;
76 void WillChangeVisibilityState(ShelfVisibilityState new_state) override; 76 void WillChangeVisibilityState(ShelfVisibilityState new_state) override;
(...skipping 16 matching lines...) Expand all
93 views::BubbleDialogDelegateView* bubble_; 93 views::BubbleDialogDelegateView* bubble_;
94 94
95 base::WeakPtrFactory<ShelfTooltipManager> weak_factory_; 95 base::WeakPtrFactory<ShelfTooltipManager> weak_factory_;
96 96
97 DISALLOW_COPY_AND_ASSIGN(ShelfTooltipManager); 97 DISALLOW_COPY_AND_ASSIGN(ShelfTooltipManager);
98 }; 98 };
99 99
100 } // namespace ash 100 } // namespace ash
101 101
102 #endif // ASH_SHELF_SHELF_TOOLTIP_MANAGER_H_ 102 #endif // ASH_SHELF_SHELF_TOOLTIP_MANAGER_H_
OLDNEW
« no previous file with comments | « ash/pointer_watcher_delegate_aura.cc ('k') | ash/shelf/shelf_tooltip_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698