Adding instrumentation to locate the source of jankiness
[chromium-blink-merge.git] / ash / system / ime / tray_ime.h
blob587bb765fd972f9491cd8237fb8587cb681f313a
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.
5 #ifndef ASH_SYSTEM_IME_TRAY_IME_H_
6 #define ASH_SYSTEM_IME_TRAY_IME_H_
8 #include "ash/system/ime/ime_observer.h"
9 #include "ash/system/tray/system_tray_item.h"
11 namespace views {
12 class Label;
15 namespace ash {
16 struct IMEInfo;
18 namespace tray {
19 class IMEDefaultView;
20 class IMEDetailedView;
21 class IMENotificationView;
24 class TrayItemView;
26 class TrayIME : public SystemTrayItem,
27 public IMEObserver {
28 public:
29 explicit TrayIME(SystemTray* system_tray);
30 virtual ~TrayIME();
32 private:
33 void UpdateTrayLabel(const IMEInfo& info, size_t count);
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;
46 // Overridden from IMEObserver.
47 virtual void OnIMERefresh() override;
49 TrayItemView* tray_label_;
50 tray::IMEDefaultView* default_;
51 tray::IMEDetailedView* detailed_;
53 DISALLOW_COPY_AND_ASSIGN(TrayIME);
56 } // namespace ash
58 #endif // ASH_SYSTEM_IME_TRAY_IME_H_