| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_IME_MENU_IME_MENU_TRAY_H_ | 5 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_IME_MENU_IME_MENU_TRAY_H_ |
| 6 #define ASH_COMMON_SYSTEM_CHROMEOS_IME_MENU_IME_MENU_TRAY_H_ | 6 #define ASH_COMMON_SYSTEM_CHROMEOS_IME_MENU_IME_MENU_TRAY_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/common/system/ime/ime_observer.h" | 9 #include "ash/common/system/ime/ime_observer.h" |
| 10 #include "ash/common/system/tray/ime_info.h" | 10 #include "ash/common/system/tray/ime_info.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 class ASH_EXPORT ImeMenuTray : public TrayBackgroundView, | 27 class ASH_EXPORT ImeMenuTray : public TrayBackgroundView, |
| 28 public IMEObserver, | 28 public IMEObserver, |
| 29 public views::TrayBubbleView::Delegate { | 29 public views::TrayBubbleView::Delegate { |
| 30 public: | 30 public: |
| 31 explicit ImeMenuTray(WmShelf* wm_shelf); | 31 explicit ImeMenuTray(WmShelf* wm_shelf); |
| 32 ~ImeMenuTray() override; | 32 ~ImeMenuTray() override; |
| 33 | 33 |
| 34 // Shows the IME menu bubble and highlights the button. | 34 // Shows the IME menu bubble and highlights the button. |
| 35 void ShowImeMenuBubble(); | 35 void ShowImeMenuBubble(); |
| 36 | 36 |
| 37 // Hides the IME menu bubble and lowlights the button. |
| 38 void HideImeMenuBubble(); |
| 39 |
| 37 // Returns true if the IME menu bubble has been shown. | 40 // Returns true if the IME menu bubble has been shown. |
| 38 bool IsImeMenuBubbleShown(); | 41 bool IsImeMenuBubbleShown(); |
| 39 | 42 |
| 40 // TrayBackgroundView: | 43 // TrayBackgroundView: |
| 41 void SetShelfAlignment(ShelfAlignment alignment) override; | 44 void SetShelfAlignment(ShelfAlignment alignment) override; |
| 42 base::string16 GetAccessibleNameForTray() override; | 45 base::string16 GetAccessibleNameForTray() override; |
| 43 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override; | 46 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override; |
| 44 void ClickedOutsideBubble() override; | 47 void ClickedOutsideBubble() override; |
| 45 bool PerformAction(const ui::Event& event) override; | 48 bool PerformAction(const ui::Event& event) override; |
| 46 | 49 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 62 views::Widget::InitParams* params) const override; | 65 views::Widget::InitParams* params) const override; |
| 63 void HideBubble(const views::TrayBubbleView* bubble_view) override; | 66 void HideBubble(const views::TrayBubbleView* bubble_view) override; |
| 64 | 67 |
| 65 private: | 68 private: |
| 66 // To allow the test class to access |label_|. | 69 // To allow the test class to access |label_|. |
| 67 friend class ImeMenuTrayTest; | 70 friend class ImeMenuTrayTest; |
| 68 | 71 |
| 69 // Updates the text of the label on the tray. | 72 // Updates the text of the label on the tray. |
| 70 void UpdateTrayLabel(); | 73 void UpdateTrayLabel(); |
| 71 | 74 |
| 72 // Hides the IME menu bubble and lowlights the button. | |
| 73 void HideImeMenuBubble(); | |
| 74 | |
| 75 // Bubble for default and detailed views. | 75 // Bubble for default and detailed views. |
| 76 std::unique_ptr<TrayBubbleWrapper> bubble_; | 76 std::unique_ptr<TrayBubbleWrapper> bubble_; |
| 77 ImeListView* ime_list_view_; | 77 ImeListView* ime_list_view_; |
| 78 | 78 |
| 79 views::Label* label_; | 79 views::Label* label_; |
| 80 IMEInfo current_ime_; | 80 IMEInfo current_ime_; |
| 81 | 81 |
| 82 DISALLOW_COPY_AND_ASSIGN(ImeMenuTray); | 82 DISALLOW_COPY_AND_ASSIGN(ImeMenuTray); |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 } // namespace ash | 85 } // namespace ash |
| 86 | 86 |
| 87 #endif // ASH_COMMON_SYSTEM_CHROMEOS_IME_MENU_IME_MENU_TRAY_H_ | 87 #endif // ASH_COMMON_SYSTEM_CHROMEOS_IME_MENU_IME_MENU_TRAY_H_ |
| OLD | NEW |