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

Unified Diff: ash/common/system/chromeos/ime_menu/ime_menu_tray.h

Issue 2474843002: Add virtual keyboard item into opt-in IME menu. (Closed)
Patch Set: Register observer. Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: ash/common/system/chromeos/ime_menu/ime_menu_tray.h
diff --git a/ash/common/system/chromeos/ime_menu/ime_menu_tray.h b/ash/common/system/chromeos/ime_menu/ime_menu_tray.h
index 81a3a5cf2c69e7f1645d69988020cf8ca1fa65ba..0d4d6adb4728fb0d229f5c108aee2cd2699e3d8e 100644
--- a/ash/common/system/chromeos/ime_menu/ime_menu_tray.h
+++ b/ash/common/system/chromeos/ime_menu/ime_menu_tray.h
@@ -6,6 +6,7 @@
#define ASH_COMMON_SYSTEM_CHROMEOS_IME_MENU_IME_MENU_TRAY_H_
#include "ash/ash_export.h"
+#include "ash/common/system/chromeos/virtual_keyboard/virtual_keyboard_observer.h"
#include "ash/common/system/ime/ime_observer.h"
#include "ash/common/system/tray/ime_info.h"
#include "ash/common/system/tray/tray_background_view.h"
@@ -28,7 +29,8 @@ class WmWindow;
class ASH_EXPORT ImeMenuTray : public TrayBackgroundView,
public IMEObserver,
public views::TrayBubbleView::Delegate,
- public keyboard::KeyboardControllerObserver {
+ public keyboard::KeyboardControllerObserver,
+ public VirtualKeyboardObserver {
public:
explicit ImeMenuTray(WmShelf* wm_shelf);
~ImeMenuTray() override;
@@ -54,6 +56,10 @@ class ASH_EXPORT ImeMenuTray : public TrayBackgroundView,
// for non-MD UI, and a Settings button in the title row for MD.
bool ShouldShowEmojiHandwritingVoiceButtons() const;
+ // Returns whether the virtual keyboard toggle should be shown in the detailed
tdanderson 2016/11/23 03:08:40 nit: "shown in the opt-in IME menu" rather than 'd
Azure Wei 2016/11/23 05:21:14 Done.
+ // view.
+ bool ShouldShowKeyboardToggle() const;
+
// TrayBackgroundView:
void SetShelfAlignment(ShelfAlignment alignment) override;
base::string16 GetAccessibleNameForTray() override;
@@ -81,6 +87,9 @@ class ASH_EXPORT ImeMenuTray : public TrayBackgroundView,
void OnKeyboardClosed() override;
void OnKeyboardHidden() override;
+ // VirtualKeyboardObserver:
+ void OnKeyboardSuppressionChanged(bool suppressed) override;
+
private:
// To allow the test class to access |label_|.
friend class ImeMenuTrayTest;
@@ -97,6 +106,7 @@ class ASH_EXPORT ImeMenuTray : public TrayBackgroundView,
bool show_keyboard_;
bool force_show_keyboard_;
bool should_block_shelf_auto_hide_;
+ bool keyboard_suppressed_;
DISALLOW_COPY_AND_ASSIGN(ImeMenuTray);
};

Powered by Google App Engine
This is Rietveld 408576698