OLD | NEW |
---|---|
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 19 matching lines...) Expand all Loading... | |
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. | 39 // Shows the IME menu bubble and highlights the button. |
40 void ShowImeMenuBubble(); | 40 void ShowImeMenuBubble(); |
msw
2017/07/12 05:04:50
Remove this function, as it's now redundant with S
minch1
2017/07/13 19:10:35
Done.
| |
41 | 41 |
42 // Hides the IME menu bubble and lowlights the button. | 42 // Hides the IME menu bubble and lowlights the button. |
43 void HideImeMenuBubble(); | 43 void HideImeMenuBubble(); |
msw
2017/07/12 05:04:50
Remove this function, as it's now redundant with C
minch1
2017/07/13 19:10:35
Done.
| |
44 | 44 |
45 // Returns true if the IME menu bubble has been shown. | 45 // Returns true if the IME menu bubble has been shown. |
46 bool IsImeMenuBubbleShown(); | 46 bool IsImeMenuBubbleShown(); |
msw
2017/07/12 05:04:51
Remove this function, as it's now redundant with G
minch1
2017/07/13 19:10:35
Done.
| |
47 | 47 |
48 // Shows the virtual keyboard with the given keyset: emoji, handwriting or | 48 // Shows the virtual keyboard with the given keyset: emoji, handwriting or |
49 // voice. | 49 // voice. |
50 void ShowKeyboardWithKeyset(const std::string& keyset); | 50 void ShowKeyboardWithKeyset(const std::string& keyset); |
51 | 51 |
52 // Returns true if the menu should show emoji, handwriting and voice buttons | 52 // 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 | 53 // 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. | 54 // for non-MD UI, and a Settings button in the title row for MD. |
55 bool ShouldShowBottomButtons(); | 55 bool ShouldShowBottomButtons(); |
56 | 56 |
57 // Returns whether the virtual keyboard toggle should be shown in shown in the | 57 // Returns whether the virtual keyboard toggle should be shown in shown in the |
58 // opt-in IME menu. | 58 // opt-in IME menu. |
59 bool ShouldShowKeyboardToggle() const; | 59 bool ShouldShowKeyboardToggle() const; |
60 | 60 |
61 // TrayBackgroundView: | 61 // TrayBackgroundView: |
62 base::string16 GetAccessibleNameForTray() override; | 62 base::string16 GetAccessibleNameForTray() override; |
63 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override; | 63 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override; |
64 void ClickedOutsideBubble() override; | 64 void ClickedOutsideBubble() override; |
65 bool PerformAction(const ui::Event& event) override; | 65 bool PerformAction(const ui::Event& event) override; |
66 bool HasBubble() override; | |
67 void CloseBubble() override; | |
68 void ShowBubble() override; | |
69 views::TrayBubbleView* GetBubbleView() override; | |
70 | |
71 // ui::EventHandler: | |
msw
2017/07/12 05:04:51
nit: Since this interface is inherited via the sub
minch1
2017/07/13 19:10:35
Done.
| |
72 void OnGestureEvent(ui::GestureEvent* event) override; | |
66 | 73 |
67 // IMEObserver: | 74 // IMEObserver: |
68 void OnIMERefresh() override; | 75 void OnIMERefresh() override; |
69 void OnIMEMenuActivationChanged(bool is_activated) override; | 76 void OnIMEMenuActivationChanged(bool is_activated) override; |
70 | 77 |
71 // views::TrayBubbleView::Delegate: | 78 // views::TrayBubbleView::Delegate: |
72 void BubbleViewDestroyed() override; | 79 void BubbleViewDestroyed() override; |
73 void OnMouseEnteredView() override; | 80 void OnMouseEnteredView() override; |
74 void OnMouseExitedView() override; | 81 void OnMouseExitedView() override; |
75 void RegisterAccelerators(const std::vector<ui::Accelerator>& accelerators, | 82 void RegisterAccelerators(const std::vector<ui::Accelerator>& accelerators, |
76 views::TrayBubbleView* tray_bubble_view) override; | 83 views::TrayBubbleView* tray_bubble_view) override; |
77 void UnregisterAllAccelerators( | 84 void UnregisterAllAccelerators( |
78 views::TrayBubbleView* tray_bubble_view) override; | 85 views::TrayBubbleView* tray_bubble_view) override; |
79 base::string16 GetAccessibleNameForBubble() override; | 86 base::string16 GetAccessibleNameForBubble() override; |
80 bool ShouldEnableExtraKeyboardAccessibility() override; | 87 bool ShouldEnableExtraKeyboardAccessibility() override; |
81 void HideBubble(const views::TrayBubbleView* bubble_view) override; | 88 void HideBubble(const views::TrayBubbleView* bubble_view) override; |
89 bool ProcessGestureEventForBubble(ui::GestureEvent* event) override; | |
82 | 90 |
83 // keyboard::KeyboardControllerObserver: | 91 // keyboard::KeyboardControllerObserver: |
84 void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override; | 92 void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override; |
85 void OnKeyboardClosed() override; | 93 void OnKeyboardClosed() override; |
86 void OnKeyboardHidden() override; | 94 void OnKeyboardHidden() override; |
87 | 95 |
88 // VirtualKeyboardObserver: | 96 // VirtualKeyboardObserver: |
89 void OnKeyboardSuppressionChanged(bool suppressed) override; | 97 void OnKeyboardSuppressionChanged(bool suppressed) override; |
90 | 98 |
91 private: | 99 private: |
(...skipping 25 matching lines...) Expand all Loading... | |
117 bool voice_enabled_; | 125 bool voice_enabled_; |
118 | 126 |
119 base::WeakPtrFactory<ImeMenuTray> weak_ptr_factory_; | 127 base::WeakPtrFactory<ImeMenuTray> weak_ptr_factory_; |
120 | 128 |
121 DISALLOW_COPY_AND_ASSIGN(ImeMenuTray); | 129 DISALLOW_COPY_AND_ASSIGN(ImeMenuTray); |
122 }; | 130 }; |
123 | 131 |
124 } // namespace ash | 132 } // namespace ash |
125 | 133 |
126 #endif // ASH_SYSTEM_IME_MENU_IME_MENU_TRAY_H_ | 134 #endif // ASH_SYSTEM_IME_MENU_IME_MENU_TRAY_H_ |
OLD | NEW |