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

Side by Side Diff: ash/system/palette/palette_tray.h

Issue 2961313003: Touch gestures for System Tray/ IME/ Stylus/ Notifications (Closed)
Patch Set: Swiping IME/Stylues/System tray/Notifications tray/bubble. Created 3 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_SYSTEM_PALETTE_PALETTE_TRAY_H_ 5 #ifndef ASH_SYSTEM_PALETTE_PALETTE_TRAY_H_
6 #define ASH_SYSTEM_PALETTE_PALETTE_TRAY_H_ 6 #define ASH_SYSTEM_PALETTE_PALETTE_TRAY_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
(...skipping 26 matching lines...) Expand all
37 class ASH_EXPORT PaletteTray : public TrayBackgroundView, 37 class ASH_EXPORT PaletteTray : public TrayBackgroundView,
38 public SessionObserver, 38 public SessionObserver,
39 public ShellObserver, 39 public ShellObserver,
40 public PaletteToolManager::Delegate, 40 public PaletteToolManager::Delegate,
41 public ui::InputDeviceEventObserver, 41 public ui::InputDeviceEventObserver,
42 public views::TrayBubbleView::Delegate { 42 public views::TrayBubbleView::Delegate {
43 public: 43 public:
44 explicit PaletteTray(Shelf* shelf); 44 explicit PaletteTray(Shelf* shelf);
45 ~PaletteTray() override; 45 ~PaletteTray() override;
46 46
47 // ActionableView:
48 bool PerformAction(const ui::Event& event) override;
49
50 // SessionObserver: 47 // SessionObserver:
51 void OnSessionStateChanged(session_manager::SessionState state) override; 48 void OnSessionStateChanged(session_manager::SessionState state) override;
52 49
53 // ShellObserver: 50 // ShellObserver:
54 void OnLockStateChanged(bool locked) override; 51 void OnLockStateChanged(bool locked) override;
55 52
56 // TrayBackgroundView: 53 // TrayBackgroundView:
57 void ClickedOutsideBubble() override; 54 void ClickedOutsideBubble() override;
58 base::string16 GetAccessibleNameForTray() override; 55 base::string16 GetAccessibleNameForTray() override;
59 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override; 56 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override;
60 void AnchorUpdated() override; 57 void AnchorUpdated() override;
61 void Initialize() override; 58 void Initialize() override;
59 bool PerformAction(const ui::Event& event) override;
60 bool HasBubble() override;
61 void CloseBubble() override;
62 void ShowBubble() override;
63 views::TrayBubbleView* GetBubbleView() override;
64
65 // ui::EventHandler:
66 void OnGestureEvent(ui::GestureEvent* event) override;
62 67
63 // PaletteToolManager::Delegate: 68 // PaletteToolManager::Delegate:
64 void HidePalette() override; 69 void HidePalette() override;
65 void HidePaletteImmediately() override; 70 void HidePaletteImmediately() override;
66 void RecordPaletteOptionsUsage(PaletteTrayOptions option) override; 71 void RecordPaletteOptionsUsage(PaletteTrayOptions option) override;
67 void RecordPaletteModeCancellation(PaletteModeCancelType type) override; 72 void RecordPaletteModeCancellation(PaletteModeCancelType type) override;
68 73
69 // Opens up the palette if it is not already open. Returns true if the palette 74 // Opens up the palette if it is not already open. Returns true if the palette
70 // was opened. 75 // was opened.
71 bool ShowPalette(); 76 bool ShowPalette();
msw 2017/07/12 05:04:51 Remove this function, as it's now redundant with S
minch1 2017/07/13 19:10:35 Done.
72 77
73 // Returns true if the palette tray contains the given point. This is useful 78 // Returns true if the palette tray contains the given point. This is useful
74 // for determining if an event should be propagated through to the palette. 79 // for determining if an event should be propagated through to the palette.
75 bool ContainsPointInScreen(const gfx::Point& point); 80 bool ContainsPointInScreen(const gfx::Point& point);
76 81
77 private: 82 private:
78 // ui::InputDeviceObserver: 83 // ui::InputDeviceObserver:
79 void OnTouchscreenDeviceConfigurationChanged() override; 84 void OnTouchscreenDeviceConfigurationChanged() override;
80 void OnStylusStateChanged(ui::StylusState stylus_state) override; 85 void OnStylusStateChanged(ui::StylusState stylus_state) override;
81 86
82 // views::TrayBubbleView::Delegate: 87 // views::TrayBubbleView::Delegate:
83 void BubbleViewDestroyed() override; 88 void BubbleViewDestroyed() override;
84 void OnMouseEnteredView() override; 89 void OnMouseEnteredView() override;
85 void OnMouseExitedView() override; 90 void OnMouseExitedView() override;
86 void RegisterAccelerators(const std::vector<ui::Accelerator>& accelerators, 91 void RegisterAccelerators(const std::vector<ui::Accelerator>& accelerators,
87 views::TrayBubbleView* tray_bubble_view) override; 92 views::TrayBubbleView* tray_bubble_view) override;
88 void UnregisterAllAccelerators( 93 void UnregisterAllAccelerators(
89 views::TrayBubbleView* tray_bubble_view) override; 94 views::TrayBubbleView* tray_bubble_view) override;
90 base::string16 GetAccessibleNameForBubble() override; 95 base::string16 GetAccessibleNameForBubble() override;
91 bool ShouldEnableExtraKeyboardAccessibility() override; 96 bool ShouldEnableExtraKeyboardAccessibility() override;
92 void HideBubble(const views::TrayBubbleView* bubble_view) override; 97 void HideBubble(const views::TrayBubbleView* bubble_view) override;
98 bool ProcessGestureEventForBubble(ui::GestureEvent* event) override;
93 99
94 // PaletteToolManager::Delegate: 100 // PaletteToolManager::Delegate:
95 void OnActiveToolChanged() override; 101 void OnActiveToolChanged() override;
96 aura::Window* GetWindow() override; 102 aura::Window* GetWindow() override;
97 103
98 // Updates the tray icon from the palette tool manager. 104 // Updates the tray icon from the palette tool manager.
99 void UpdateTrayIcon(); 105 void UpdateTrayIcon();
100 106
101 // Sets the icon to visible if the palette can be used. 107 // Sets the icon to visible if the palette can be used.
102 void UpdateIconVisibility(); 108 void UpdateIconVisibility();
(...skipping 25 matching lines...) Expand all
128 ScopedSessionObserver scoped_session_observer_; 134 ScopedSessionObserver scoped_session_observer_;
129 135
130 base::WeakPtrFactory<PaletteTray> weak_factory_; 136 base::WeakPtrFactory<PaletteTray> weak_factory_;
131 137
132 DISALLOW_COPY_AND_ASSIGN(PaletteTray); 138 DISALLOW_COPY_AND_ASSIGN(PaletteTray);
133 }; 139 };
134 140
135 } // namespace ash 141 } // namespace ash
136 142
137 #endif // ASH_SYSTEM_PALETTE_PALETTE_TRAY_H_ 143 #endif // ASH_SYSTEM_PALETTE_PALETTE_TRAY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698