| 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 #include "ash/system/ime_menu/ime_menu_tray.h" | 5 #include "ash/system/ime_menu/ime_menu_tray.h" |
| 6 | 6 |
| 7 #include "ash/accelerators/accelerator_controller.h" | 7 #include "ash/accelerators/accelerator_controller.h" |
| 8 #include "ash/accessibility_delegate.h" | 8 #include "ash/accessibility_delegate.h" |
| 9 #include "ash/ime/ime_controller.h" | 9 #include "ash/ime/ime_controller.h" |
| 10 #include "ash/public/interfaces/ime_info.mojom.h" | 10 #include "ash/public/interfaces/ime_info.mojom.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // Returns true if the IME menu tray is visible. | 55 // Returns true if the IME menu tray is visible. |
| 56 bool IsVisible() { return GetTray()->visible(); } | 56 bool IsVisible() { return GetTray()->visible(); } |
| 57 | 57 |
| 58 // Returns the label text of the tray. | 58 // Returns the label text of the tray. |
| 59 const base::string16& GetTrayText() { return GetTray()->label_->text(); } | 59 const base::string16& GetTrayText() { return GetTray()->label_->text(); } |
| 60 | 60 |
| 61 // Returns true if the background color of the tray is active. | 61 // Returns true if the background color of the tray is active. |
| 62 bool IsTrayBackgroundActive() { return GetTray()->is_active(); } | 62 bool IsTrayBackgroundActive() { return GetTray()->is_active(); } |
| 63 | 63 |
| 64 // Returns true if the IME menu bubble has been shown. | 64 // Returns true if the IME menu bubble has been shown. |
| 65 bool IsBubbleShown() { return GetTray()->IsImeMenuBubbleShown(); } | 65 bool IsBubbleShown() { return GetTray()->GetBubbleView() != nullptr; } |
| 66 | 66 |
| 67 // Returns true if emoji palatte is enabled for the current keyboard. | 67 // Returns true if emoji palatte is enabled for the current keyboard. |
| 68 bool IsEmojiEnabled() { return GetTray()->emoji_enabled_; } | 68 bool IsEmojiEnabled() { return GetTray()->emoji_enabled_; } |
| 69 | 69 |
| 70 // Returns true if handwirting input is enabled for the current keyboard. | 70 // Returns true if handwirting input is enabled for the current keyboard. |
| 71 bool IsHandwritingEnabled() { return GetTray()->handwriting_enabled_; } | 71 bool IsHandwritingEnabled() { return GetTray()->handwriting_enabled_; } |
| 72 | 72 |
| 73 // Returns true if voice input is enabled for the current keyboard. | 73 // Returns true if voice input is enabled for the current keyboard. |
| 74 bool IsVoiceEnabled() { return GetTray()->voice_enabled_; } | 74 bool IsVoiceEnabled() { return GetTray()->voice_enabled_; } |
| 75 | 75 |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 InputMethodManager::FEATURE_VOICE)); | 372 InputMethodManager::FEATURE_VOICE)); |
| 373 EXPECT_FALSE(input_method_manager->GetImeMenuFeatureEnabled( | 373 EXPECT_FALSE(input_method_manager->GetImeMenuFeatureEnabled( |
| 374 InputMethodManager::FEATURE_HANDWRITING)); | 374 InputMethodManager::FEATURE_HANDWRITING)); |
| 375 EXPECT_TRUE(GetTray()->ShouldShowBottomButtons()); | 375 EXPECT_TRUE(GetTray()->ShouldShowBottomButtons()); |
| 376 EXPECT_TRUE(IsEmojiEnabled()); | 376 EXPECT_TRUE(IsEmojiEnabled()); |
| 377 EXPECT_FALSE(IsHandwritingEnabled()); | 377 EXPECT_FALSE(IsHandwritingEnabled()); |
| 378 EXPECT_FALSE(IsVoiceEnabled()); | 378 EXPECT_FALSE(IsVoiceEnabled()); |
| 379 } | 379 } |
| 380 | 380 |
| 381 } // namespace ash | 381 } // namespace ash |
| OLD | NEW |