| 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 #include "ash/common/system/chromeos/ime_menu/ime_menu_tray.h" | 5 #include "ash/common/system/chromeos/ime_menu/ime_menu_tray.h" |
| 6 | 6 |
| 7 #include "ash/common/accessibility_delegate.h" | 7 #include "ash/common/accessibility_delegate.h" |
| 8 #include "ash/common/ash_constants.h" | 8 #include "ash/common/ash_constants.h" |
| 9 #include "ash/common/session/session_state_delegate.h" | 9 #include "ash/common/session/session_state_delegate.h" |
| 10 #include "ash/common/shelf/wm_shelf.h" | 10 #include "ash/common/shelf/wm_shelf.h" |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 | 242 |
| 243 ImeMenuTray* ime_menu_tray_; | 243 ImeMenuTray* ime_menu_tray_; |
| 244 SystemMenuButton* emoji_button_; | 244 SystemMenuButton* emoji_button_; |
| 245 SystemMenuButton* handwriting_button_; | 245 SystemMenuButton* handwriting_button_; |
| 246 SystemMenuButton* voice_button_; | 246 SystemMenuButton* voice_button_; |
| 247 SystemMenuButton* settings_button_; | 247 SystemMenuButton* settings_button_; |
| 248 | 248 |
| 249 DISALLOW_COPY_AND_ASSIGN(ImeButtonsView); | 249 DISALLOW_COPY_AND_ASSIGN(ImeButtonsView); |
| 250 }; | 250 }; |
| 251 | 251 |
| 252 // The list view that contains the selected IME and property items. | 252 // A list of available IMEs shown in the opt-in IME menu, which has a different |
| 253 // height depending on the number of IMEs in the list. |
| 253 class ImeMenuListView : public ImeListView { | 254 class ImeMenuListView : public ImeListView { |
| 254 public: | 255 public: |
| 255 ImeMenuListView(SystemTrayItem* owner) : ImeListView(owner) { | 256 ImeMenuListView(SystemTrayItem* owner) : ImeListView(owner) { |
| 256 set_should_focus_ime_after_selection_with_keyboard(true); | 257 set_should_focus_ime_after_selection_with_keyboard(true); |
| 257 } | 258 } |
| 258 | 259 |
| 259 ~ImeMenuListView() override {} | 260 ~ImeMenuListView() override {} |
| 260 | 261 |
| 261 protected: | 262 protected: |
| 262 void Layout() override { | 263 void Layout() override { |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 Shell::Get()->system_tray_delegate()->GetCurrentIME(¤t_ime_); | 543 Shell::Get()->system_tray_delegate()->GetCurrentIME(¤t_ime_); |
| 543 | 544 |
| 544 // Updates the tray label based on the current input method. | 545 // Updates the tray label based on the current input method. |
| 545 if (current_ime_.third_party) | 546 if (current_ime_.third_party) |
| 546 label_->SetText(current_ime_.short_name + base::UTF8ToUTF16("*")); | 547 label_->SetText(current_ime_.short_name + base::UTF8ToUTF16("*")); |
| 547 else | 548 else |
| 548 label_->SetText(current_ime_.short_name); | 549 label_->SetText(current_ime_.short_name); |
| 549 } | 550 } |
| 550 | 551 |
| 551 } // namespace ash | 552 } // namespace ash |
| OLD | NEW |