| 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_LIST_VIEW_H_ | 5 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_IME_MENU_IME_LIST_VIEW_H_ |
| 6 #define ASH_COMMON_SYSTEM_CHROMEOS_IME_MENU_IME_LIST_VIEW_H_ | 6 #define ASH_COMMON_SYSTEM_CHROMEOS_IME_MENU_IME_LIST_VIEW_H_ |
| 7 | 7 |
| 8 #include "ash/common/system/tray/ime_info.h" | 8 #include "ash/common/system/tray/ime_info.h" |
| 9 #include "ash/common/system/tray/tray_details_view.h" | 9 #include "ash/common/system/tray/tray_details_view.h" |
| 10 #include "ui/gfx/range/range.h" |
| 10 #include "ui/views/controls/button/button.h" | 11 #include "ui/views/controls/button/button.h" |
| 11 | 12 |
| 12 namespace ash { | 13 namespace ash { |
| 13 class MaterialKeyboardStatusRowView; | 14 class MaterialKeyboardStatusRowView; |
| 14 | 15 |
| 15 // The detailed view for showing IME list. | 16 // The detailed view for showing IME list. |
| 16 class ImeListView : public TrayDetailsView { | 17 class ImeListView : public TrayDetailsView { |
| 17 public: | 18 public: |
| 18 enum SingleImeBehavior { | 19 enum SingleImeBehavior { |
| 19 // Shows the IME menu if there's only one IME in system. | 20 // Shows the IME menu if there's only one IME in system. |
| 20 SHOW_SINGLE_IME, | 21 SHOW_SINGLE_IME, |
| 21 // Hides the IME menu if there's only one IME in system. | 22 // Hides the IME menu if there's only one IME in system. |
| 22 HIDE_SINGLE_IME | 23 HIDE_SINGLE_IME |
| 23 }; | 24 }; |
| 24 | 25 |
| 25 ImeListView(SystemTrayItem* owner, | 26 ImeListView(SystemTrayItem* owner, |
| 26 bool show_keyboard_toggle, | 27 bool show_keyboard_toggle, |
| 27 SingleImeBehavior single_ime_behavior); | 28 SingleImeBehavior single_ime_behavior, |
| 29 const gfx::Range& scrollable_range); |
| 28 | 30 |
| 29 ~ImeListView() override; | 31 ~ImeListView() override; |
| 30 | 32 |
| 31 // Updates the view. | 33 // Updates the view. |
| 32 virtual void Update(const IMEInfoList& list, | 34 virtual void Update(const IMEInfoList& list, |
| 33 const IMEPropertyInfoList& property_list, | 35 const IMEPropertyInfoList& property_list, |
| 34 bool show_keyboard_toggle, | 36 bool show_keyboard_toggle, |
| 35 SingleImeBehavior single_ime_behavior); | 37 SingleImeBehavior single_ime_behavior); |
| 36 | 38 |
| 37 // Removes (and destroys) all child views. | 39 // Removes (and destroys) all child views. |
| (...skipping 25 matching lines...) Expand all Loading... |
| 63 | 65 |
| 64 // Inserts the material on-screen keyboard status in the detailed view. | 66 // Inserts the material on-screen keyboard status in the detailed view. |
| 65 void PrependMaterialKeyboardStatus(); | 67 void PrependMaterialKeyboardStatus(); |
| 66 | 68 |
| 67 std::map<views::View*, std::string> ime_map_; | 69 std::map<views::View*, std::string> ime_map_; |
| 68 std::map<views::View*, std::string> property_map_; | 70 std::map<views::View*, std::string> property_map_; |
| 69 // On-screen keyboard view which is not used in material design. | 71 // On-screen keyboard view which is not used in material design. |
| 70 views::View* keyboard_status_; | 72 views::View* keyboard_status_; |
| 71 // On-screen keyboard view which is only used in material design. | 73 // On-screen keyboard view which is only used in material design. |
| 72 MaterialKeyboardStatusRowView* material_keyboard_status_view_; | 74 MaterialKeyboardStatusRowView* material_keyboard_status_view_; |
| 75 gfx::Range scrollable_range_; |
| 73 | 76 |
| 74 DISALLOW_COPY_AND_ASSIGN(ImeListView); | 77 DISALLOW_COPY_AND_ASSIGN(ImeListView); |
| 75 }; | 78 }; |
| 76 | 79 |
| 77 } // namespace ash | 80 } // namespace ash |
| 78 | 81 |
| 79 #endif // ASH_COMMON_SYSTEM_CHROMEOS_IME_MENU_IME_LIST_VIEW_H_ | 82 #endif // ASH_COMMON_SYSTEM_CHROMEOS_IME_MENU_IME_LIST_VIEW_H_ |
| OLD | NEW |