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

Side by Side Diff: ash/system/chromeos/ime_menu/ime_menu_tray.h

Issue 1996563002: Add ImeMenuTray element. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync code. Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « ash/shelf/shelf_util.cc ('k') | ash/system/chromeos/ime_menu/ime_menu_tray.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef ASH_SYSTEM_CHROMEOS_IME_MENU_IME_MENU_TRAY_H_
6 #define ASH_SYSTEM_CHROMEOS_IME_MENU_IME_MENU_TRAY_H_
7
8 #include "ash/ash_export.h"
9 #include "ash/common/system/ime/ime_observer.h"
10 #include "ash/common/system/tray/system_tray_delegate.h"
11 #include "ash/common/system/tray/tray_background_view.h"
12 #include "ash/common/wm/window_state_observer.h"
13 #include "base/macros.h"
14
15 namespace views {
16 class Label;
17 }
18
19 namespace ash {
20 class StatusAreaWidget;
21
22 class ASH_EXPORT ImeMenuTray : public TrayBackgroundView,
23 public IMEObserver,
24 public wm::WindowStateObserver {
25 public:
26 explicit ImeMenuTray(StatusAreaWidget* status_area_widget);
27 ~ImeMenuTray() override;
28
29 // Sets the window state of the IME menu AppWindow.
30 void SetWindowState(wm::WindowState* window_state);
sky 2016/06/30 16:21:39 WindowState is owned by the corresponding window.
Azure Wei 2016/06/30 17:45:01 Changed the method SetWindowState(wm::WindowState*
31
32 // TrayBackgroundView:
33 void SetShelfAlignment(ShelfAlignment alignment) override;
34 base::string16 GetAccessibleNameForTray() override;
35 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override;
36 void ClickedOutsideBubble() override;
37 bool PerformAction(const ui::Event& event) override;
38
39 // IMEObserver:
40 void OnIMERefresh() override;
41 void OnIMEMenuActivationChanged(bool is_activated) override;
42
43 // wm::WindowStateObserver:
44 void OnPostWindowStateTypeChange(wm::WindowState* window_state,
45 wm::WindowStateType old_type) override;
46
47 private:
48 // To allow the test class to access GetLabelTextForTest() method.
49 friend class ImeMenuTrayTest;
50
51 // Updates the UI of the IME menu tray.
52 void UpdateTray();
53
54 // Sets the border of the label to keep the tray width consistant.
55 void SetLabelBorder();
56
57 views::Label* label_;
58 ash::wm::WindowState* window_state_;
59 ash::IMEInfo current_ime_;
60
61 DISALLOW_COPY_AND_ASSIGN(ImeMenuTray);
62 };
63
64 } // namespace ash
65
66 #endif // ASH_SYSTEM_CHROMEOS_IME_MENU_IME_MENU_TRAY_H_
OLDNEW
« no previous file with comments | « ash/shelf/shelf_util.cc ('k') | ash/system/chromeos/ime_menu/ime_menu_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698