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

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 msw's comments. 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 11 matching lines...) Expand all
22 namespace ash { 22 namespace ash {
23 class ImeController; 23 class ImeController;
24 class ImeListView; 24 class ImeListView;
25 25
26 // A button in the tray which displays the short name of the currently-activated 26 // A button in the tray which displays the short name of the currently-activated
27 // IME (e.g., 'GB', 'US'). Clicking this button opens the opt-in IME menu, 27 // IME (e.g., 'GB', 'US'). Clicking this button opens the opt-in IME menu,
28 // a standalone bubble displaying a list of available IMEs along with buttons 28 // a standalone bubble displaying a list of available IMEs along with buttons
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,
33 public keyboard::KeyboardControllerObserver, 32 public keyboard::KeyboardControllerObserver,
34 public VirtualKeyboardObserver { 33 public VirtualKeyboardObserver {
35 public: 34 public:
36 explicit ImeMenuTray(Shelf* shelf); 35 explicit ImeMenuTray(Shelf* shelf);
37 ~ImeMenuTray() override; 36 ~ImeMenuTray() override;
38 37
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 38 // Shows the virtual keyboard with the given keyset: emoji, handwriting or
49 // voice. 39 // voice.
50 void ShowKeyboardWithKeyset(const std::string& keyset); 40 void ShowKeyboardWithKeyset(const std::string& keyset);
51 41
52 // Returns true if the menu should show emoji, handwriting and voice buttons 42 // 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 43 // 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. 44 // for non-MD UI, and a Settings button in the title row for MD.
55 bool ShouldShowBottomButtons(); 45 bool ShouldShowBottomButtons();
56 46
57 // Returns whether the virtual keyboard toggle should be shown in shown in the 47 // Returns whether the virtual keyboard toggle should be shown in shown in the
58 // opt-in IME menu. 48 // opt-in IME menu.
59 bool ShouldShowKeyboardToggle() const; 49 bool ShouldShowKeyboardToggle() const;
60 50
61 // TrayBackgroundView: 51 // TrayBackgroundView:
62 base::string16 GetAccessibleNameForTray() override; 52 base::string16 GetAccessibleNameForTray() override;
63 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override; 53 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override;
64 void ClickedOutsideBubble() override; 54 void ClickedOutsideBubble() override;
65 bool PerformAction(const ui::Event& event) override; 55 bool PerformAction(const ui::Event& event) override;
56 void CloseBubble() override;
57 void ShowBubble() override;
58 views::TrayBubbleView* GetBubbleView() override;
66 59
67 // IMEObserver: 60 // IMEObserver:
68 void OnIMERefresh() override; 61 void OnIMERefresh() override;
69 void OnIMEMenuActivationChanged(bool is_activated) override; 62 void OnIMEMenuActivationChanged(bool is_activated) override;
70 63
71 // views::TrayBubbleView::Delegate: 64 // views::TrayBubbleView::Delegate:
72 void BubbleViewDestroyed() override; 65 void BubbleViewDestroyed() override;
73 void OnMouseEnteredView() override; 66 void OnMouseEnteredView() override;
74 void OnMouseExitedView() override; 67 void OnMouseExitedView() override;
75 void RegisterAccelerators(const std::vector<ui::Accelerator>& accelerators, 68 void RegisterAccelerators(const std::vector<ui::Accelerator>& accelerators,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 bool voice_enabled_; 109 bool voice_enabled_;
117 110
118 base::WeakPtrFactory<ImeMenuTray> weak_ptr_factory_; 111 base::WeakPtrFactory<ImeMenuTray> weak_ptr_factory_;
119 112
120 DISALLOW_COPY_AND_ASSIGN(ImeMenuTray); 113 DISALLOW_COPY_AND_ASSIGN(ImeMenuTray);
121 }; 114 };
122 115
123 } // namespace ash 116 } // namespace ash
124 117
125 #endif // ASH_SYSTEM_IME_MENU_IME_MENU_TRAY_H_ 118 #endif // ASH_SYSTEM_IME_MENU_IME_MENU_TRAY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698