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

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

Issue 2953033002: Hide handwriting and voice buttons when keyboard is in restricted state (Closed)
Patch Set: Add InputMethodManager::FeaturesRestrictedState Created 3 years, 6 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
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();
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 ShouldShowEmojiHandwritingVoiceButtons() const; 55 bool ShouldShowBottomButtons(bool& emoji,
James Cook 2017/06/26 17:21:19 nit: out parameters should be bool*
Azure Wei 2017/06/27 14:27:14 Done.
56 bool& handwriting,
57 bool& voice) const;
56 58
57 // Returns whether the virtual keyboard toggle should be shown in shown in the 59 // Returns whether the virtual keyboard toggle should be shown in shown in the
58 // opt-in IME menu. 60 // opt-in IME menu.
59 bool ShouldShowKeyboardToggle() const; 61 bool ShouldShowKeyboardToggle() const;
60 62
61 // TrayBackgroundView: 63 // TrayBackgroundView:
62 base::string16 GetAccessibleNameForTray() override; 64 base::string16 GetAccessibleNameForTray() override;
63 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override; 65 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override;
64 void ClickedOutsideBubble() override; 66 void ClickedOutsideBubble() override;
65 bool PerformAction(const ui::Event& event) override; 67 bool PerformAction(const ui::Event& event) override;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 bool show_bubble_after_keyboard_hidden_; 116 bool show_bubble_after_keyboard_hidden_;
115 117
116 base::WeakPtrFactory<ImeMenuTray> weak_ptr_factory_; 118 base::WeakPtrFactory<ImeMenuTray> weak_ptr_factory_;
117 119
118 DISALLOW_COPY_AND_ASSIGN(ImeMenuTray); 120 DISALLOW_COPY_AND_ASSIGN(ImeMenuTray);
119 }; 121 };
120 122
121 } // namespace ash 123 } // namespace ash
122 124
123 #endif // ASH_SYSTEM_IME_MENU_IME_MENU_TRAY_H_ 125 #endif // ASH_SYSTEM_IME_MENU_IME_MENU_TRAY_H_
OLDNEW
« no previous file with comments | « no previous file | ash/system/ime_menu/ime_menu_tray.cc » ('j') | ash/system/ime_menu/ime_menu_tray.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698