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

Unified Diff: ash/system/ime/tray_ime_chromeos.h

Issue 843603004: Moves smart deploy UI into the IME tray. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made tray_ime chromeos only. Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: ash/system/ime/tray_ime_chromeos.h
diff --git a/ash/system/ime/tray_ime.h b/ash/system/ime/tray_ime_chromeos.h
similarity index 62%
rename from ash/system/ime/tray_ime.h
rename to ash/system/ime/tray_ime_chromeos.h
index 0e8fe217b15290ca77a615d6732af074c27d4be0..3542befb452243d5882c394599df3a73ff772dca 100644
--- a/ash/system/ime/tray_ime.h
+++ b/ash/system/ime/tray_ime_chromeos.h
@@ -2,11 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef ASH_SYSTEM_IME_TRAY_IME_H_
-#define ASH_SYSTEM_IME_TRAY_IME_H_
+#ifndef ASH_SYSTEM_IME_TRAY_IME_CHROMEOS_H_
+#define ASH_SYSTEM_IME_TRAY_IME_CHROMEOS_H_
+#include "ash/system/chromeos/virtual_keyboard/virtual_keyboard_observer.h"
#include "ash/system/ime/ime_observer.h"
#include "ash/system/tray/system_tray_item.h"
+#include "ash/system/tray_accessibility.h"
namespace views {
class Label;
@@ -24,13 +26,25 @@ class IMENotificationView;
class TrayItemView;
class TrayIME : public SystemTrayItem,
- public IMEObserver {
+ public IMEObserver,
+ public AccessibilityObserver,
+ public VirtualKeyboardObserver {
public:
explicit TrayIME(SystemTray* system_tray);
~TrayIME() override;
+ // Overridden from VirtualKeyboardObserver.
+ void OnKeyboardSuppressionChanged(bool suppressed) override;
+
+ // Overridden from AccessibilityObserver:
+ void OnAccessibilityModeChanged(
+ ui::AccessibilityNotificationVisibility notify) override;
+
private:
+ void Update();
Mr4D (OOO till 08-26) 2015/01/09 22:50:38 You might want to add some better comments here to
rsadam 2015/01/09 23:45:07 Done.
void UpdateTrayLabel(const IMEInfo& info, size_t count);
+ bool ShouldShowKeyboardToggle();
+ base::string16 GetDefaultViewLabel(bool show_ime_label);
// Overridden from SystemTrayItem.
views::View* CreateTrayView(user::LoginStatus status) override;
@@ -48,10 +62,12 @@ class TrayIME : public SystemTrayItem,
TrayItemView* tray_label_;
tray::IMEDefaultView* default_;
tray::IMEDetailedView* detailed_;
+ // Whether the virtual keyboard is suppressed.
+ bool keyboard_suppressed_;
DISALLOW_COPY_AND_ASSIGN(TrayIME);
};
} // namespace ash
-#endif // ASH_SYSTEM_IME_TRAY_IME_H_
+#endif // ASH_SYSTEM_IME_TRAY_IME_CHROMEOS_H_

Powered by Google App Engine
This is Rietveld 408576698