Chromium Code Reviews| OLD | NEW |
|---|---|
| (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/tray/system_tray_delegate.h" | |
| 10 #include "ash/common/wm/window_state_observer.h" | |
| 11 #include "ash/system/ime/ime_observer.h" | |
| 12 #include "ash/system/tray/tray_background_view.h" | |
| 13 #include "base/macros.h" | |
| 14 #include "ui/aura/window_observer.h" | |
| 15 | |
| 16 namespace aura { | |
| 17 class Window; | |
| 18 } | |
| 19 | |
| 20 namespace views { | |
| 21 class Label; | |
| 22 } | |
| 23 | |
| 24 namespace ash { | |
| 25 class ImeMenuLabel; | |
| 26 class StatusAreaWidget; | |
| 27 | |
| 28 class ASH_EXPORT ImeMenuTray : public TrayBackgroundView, | |
| 29 public IMEObserver, | |
| 30 public wm::WindowStateObserver, | |
| 31 public aura::WindowObserver { | |
| 32 public: | |
| 33 explicit ImeMenuTray(StatusAreaWidget* status_area_widget); | |
| 34 ~ImeMenuTray() override; | |
| 35 | |
| 36 // TrayBackgroundView: | |
| 37 void SetShelfAlignment(ShelfAlignment alignment) override; | |
| 38 base::string16 GetAccessibleNameForTray() override; | |
| 39 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override; | |
| 40 void ClickedOutsideBubble() override; | |
| 41 bool PerformAction(const ui::Event& event) override; | |
| 42 | |
| 43 // IMEObserver: | |
| 44 void OnIMERefresh() override; | |
| 45 void OnIMEMenuActivationChanged(bool is_activated) override; | |
| 46 | |
| 47 // wm::WindowStateObserver | |
| 48 void OnPostWindowStateTypeChange(wm::WindowState* window_state, | |
| 49 wm::WindowStateType old_type) override; | |
| 50 | |
| 51 void OnWindowDestroying(aura::Window* window) override; | |
| 52 | |
| 53 void SetWindowState(wm::WindowState* window_state); | |
|
sadrul
2016/06/20 16:18:12
non-overrides before overrides.
Also, document.
Azure Wei
2016/06/22 01:47:10
Done.
| |
| 54 | |
| 55 private: | |
| 56 friend class ImeMenuTrayTest; | |
| 57 | |
| 58 aura::Window* GetAuraWindow(); | |
| 59 void UpdateTray(); | |
| 60 void SetLabelBorder(); | |
| 61 | |
| 62 base::string16 GetLabelTextForTest(); | |
| 63 | |
| 64 ImeMenuLabel* label_; | |
| 65 ash::wm::WindowState* window_state_; | |
| 66 ash::IMEInfo current_ime_; | |
| 67 | |
| 68 DISALLOW_COPY_AND_ASSIGN(ImeMenuTray); | |
| 69 }; | |
| 70 | |
| 71 } // namespace ash | |
| 72 | |
| 73 #endif // ASH_SYSTEM_CHROMEOS_IME_MENU_IME_MENU_TRAY_H_ | |
| OLD | NEW |