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

Side by Side Diff: ash/system/ime_menu/ime_menu_tray.h

Issue 2961313003: Touch gestures for System Tray/ IME/ Stylus/ Notifications (Closed)
Patch Set: Fixed UT. 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_IME_MENU_IME_MENU_TRAY_H_ 5 #ifndef ASH_SYSTEM_IME_MENU_IME_MENU_TRAY_H_
6 #define ASH_SYSTEM_IME_MENU_IME_MENU_TRAY_H_ 6 #define ASH_SYSTEM_IME_MENU_IME_MENU_TRAY_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/public/interfaces/ime_info.mojom.h" 9 #include "ash/public/interfaces/ime_info.mojom.h"
10 #include "ash/system/ime/ime_observer.h" 10 #include "ash/system/ime/ime_observer.h"
(...skipping 18 matching lines...) Expand all
29 // for emoji, handwriting, and voice. 29 // for emoji, handwriting, and voice.
30 class ASH_EXPORT ImeMenuTray : public TrayBackgroundView, 30 class ASH_EXPORT ImeMenuTray : public TrayBackgroundView,
31 public IMEObserver, 31 public IMEObserver,
32 public views::TrayBubbleView::Delegate, 32 public views::TrayBubbleView::Delegate,
33 public keyboard::KeyboardControllerObserver, 33 public keyboard::KeyboardControllerObserver,
34 public VirtualKeyboardObserver { 34 public VirtualKeyboardObserver {
35 public: 35 public:
36 explicit ImeMenuTray(Shelf* shelf); 36 explicit ImeMenuTray(Shelf* shelf);
37 ~ImeMenuTray() override; 37 ~ImeMenuTray() override;
38 38
39 // Shows the IME menu bubble and highlights the button.
40 void ShowImeMenuBubble();
41
42 // Hides the IME menu bubble and lowlights the button.
43 void HideImeMenuBubble();
44
45 // Returns true if the IME menu bubble has been shown.
46 bool IsImeMenuBubbleShown();
47
48 // Shows the virtual keyboard with the given keyset: emoji, handwriting or 39 // Shows the virtual keyboard with the given keyset: emoji, handwriting or
49 // voice. 40 // voice.
50 void ShowKeyboardWithKeyset(const std::string& keyset); 41 void ShowKeyboardWithKeyset(const std::string& keyset);
51 42
52 // Returns true if the menu should show emoji, handwriting and voice buttons 43 // Returns true if the menu should show emoji, handwriting and voice buttons
53 // on the bottom. Otherwise, the menu will show a 'Customize...' bottom row 44 // on the bottom. Otherwise, the menu will show a 'Customize...' bottom row
54 // for non-MD UI, and a Settings button in the title row for MD. 45 // for non-MD UI, and a Settings button in the title row for MD.
55 bool ShouldShowBottomButtons(); 46 bool ShouldShowBottomButtons();
56 47
57 // Returns whether the virtual keyboard toggle should be shown in shown in the 48 // Returns whether the virtual keyboard toggle should be shown in shown in the
58 // opt-in IME menu. 49 // opt-in IME menu.
59 bool ShouldShowKeyboardToggle() const; 50 bool ShouldShowKeyboardToggle() const;
60 51
61 // TrayBackgroundView: 52 // TrayBackgroundView:
62 base::string16 GetAccessibleNameForTray() override; 53 base::string16 GetAccessibleNameForTray() override;
63 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override; 54 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override;
64 void ClickedOutsideBubble() override; 55 void ClickedOutsideBubble() override;
65 bool PerformAction(const ui::Event& event) override; 56 bool PerformAction(const ui::Event& event) override;
57 void CloseBubble() override;
58 void ShowBubble() override;
59 views::TrayBubbleView* GetBubbleView() override;
60 void OnGestureEvent(ui::GestureEvent* event) override;
66 61
67 // IMEObserver: 62 // IMEObserver:
68 void OnIMERefresh() override; 63 void OnIMERefresh() override;
69 void OnIMEMenuActivationChanged(bool is_activated) override; 64 void OnIMEMenuActivationChanged(bool is_activated) override;
70 65
71 // views::TrayBubbleView::Delegate: 66 // views::TrayBubbleView::Delegate:
72 void BubbleViewDestroyed() override; 67 void BubbleViewDestroyed() override;
73 void OnMouseEnteredView() override; 68 void OnMouseEnteredView() override;
74 void OnMouseExitedView() override; 69 void OnMouseExitedView() override;
75 void RegisterAccelerators(const std::vector<ui::Accelerator>& accelerators, 70 void RegisterAccelerators(const std::vector<ui::Accelerator>& accelerators,
76 views::TrayBubbleView* tray_bubble_view) override; 71 views::TrayBubbleView* tray_bubble_view) override;
77 void UnregisterAllAccelerators( 72 void UnregisterAllAccelerators(
78 views::TrayBubbleView* tray_bubble_view) override; 73 views::TrayBubbleView* tray_bubble_view) override;
79 base::string16 GetAccessibleNameForBubble() override; 74 base::string16 GetAccessibleNameForBubble() override;
80 bool ShouldEnableExtraKeyboardAccessibility() override; 75 bool ShouldEnableExtraKeyboardAccessibility() override;
81 void HideBubble(const views::TrayBubbleView* bubble_view) override; 76 void HideBubble(const views::TrayBubbleView* bubble_view) override;
77 bool ProcessGestureEventForBubble(ui::GestureEvent* event) override;
82 78
83 // keyboard::KeyboardControllerObserver: 79 // keyboard::KeyboardControllerObserver:
84 void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override; 80 void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override;
85 void OnKeyboardClosed() override; 81 void OnKeyboardClosed() override;
86 void OnKeyboardHidden() override; 82 void OnKeyboardHidden() override;
87 83
88 // VirtualKeyboardObserver: 84 // VirtualKeyboardObserver:
89 void OnKeyboardSuppressionChanged(bool suppressed) override; 85 void OnKeyboardSuppressionChanged(bool suppressed) override;
90 86
91 private: 87 private:
(...skipping 25 matching lines...) Expand all
117 bool voice_enabled_; 113 bool voice_enabled_;
118 114
119 base::WeakPtrFactory<ImeMenuTray> weak_ptr_factory_; 115 base::WeakPtrFactory<ImeMenuTray> weak_ptr_factory_;
120 116
121 DISALLOW_COPY_AND_ASSIGN(ImeMenuTray); 117 DISALLOW_COPY_AND_ASSIGN(ImeMenuTray);
122 }; 118 };
123 119
124 } // namespace ash 120 } // namespace ash
125 121
126 #endif // ASH_SYSTEM_IME_MENU_IME_MENU_TRAY_H_ 122 #endif // ASH_SYSTEM_IME_MENU_IME_MENU_TRAY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698