• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef ASH_SYSTEM_IME_TRAY_IME_H_
6 #define ASH_SYSTEM_IME_TRAY_IME_H_
7 
8 #include "ash/system/ime/ime_observer.h"
9 #include "ash/system/tray/system_tray_item.h"
10 
11 namespace views {
12 class Label;
13 }
14 
15 namespace ash {
16 struct IMEInfo;
17 
18 namespace tray {
19 class IMEDefaultView;
20 class IMEDetailedView;
21 class IMENotificationView;
22 }
23 
24 class TrayItemView;
25 
26 class TrayIME : public SystemTrayItem,
27                 public IMEObserver {
28  public:
29   explicit TrayIME(SystemTray* system_tray);
30   virtual ~TrayIME();
31 
32  private:
33   void UpdateTrayLabel(const IMEInfo& info, size_t count);
34 
35   // Overridden from SystemTrayItem.
36   virtual views::View* CreateTrayView(user::LoginStatus status) OVERRIDE;
37   virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
38   virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE;
39   virtual void DestroyTrayView() OVERRIDE;
40   virtual void DestroyDefaultView() OVERRIDE;
41   virtual void DestroyDetailedView() OVERRIDE;
42   virtual void UpdateAfterLoginStatusChange(user::LoginStatus status) OVERRIDE;
43   virtual void UpdateAfterShelfAlignmentChange(
44       ShelfAlignment alignment) OVERRIDE;
45 
46   // Overridden from IMEObserver.
47   virtual void OnIMERefresh() OVERRIDE;
48 
49   TrayItemView* tray_label_;
50   tray::IMEDefaultView* default_;
51   tray::IMEDetailedView* detailed_;
52 
53   DISALLOW_COPY_AND_ASSIGN(TrayIME);
54 };
55 
56 }  // namespace ash
57 
58 #endif  // ASH_SYSTEM_IME_TRAY_IME_H_
59