Chromium Code Reviews| 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/material_design/material_design_controller.h" | 9 #include "ash/common/material_design/material_design_controller.h" |
| 10 #include "ash/common/session/session_state_delegate.h" | 10 #include "ash/common/session/session_state_delegate.h" |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 466 if (bubble_) | 466 if (bubble_) |
| 467 HideImeMenuBubble(); | 467 HideImeMenuBubble(); |
| 468 else | 468 else |
| 469 ShowImeMenuBubble(); | 469 ShowImeMenuBubble(); |
| 470 return true; | 470 return true; |
| 471 } | 471 } |
| 472 | 472 |
| 473 void ImeMenuTray::OnIMERefresh() { | 473 void ImeMenuTray::OnIMERefresh() { |
| 474 UpdateTrayLabel(); | 474 UpdateTrayLabel(); |
| 475 if (bubble_ && ime_list_view_) { | 475 if (bubble_ && ime_list_view_) { |
| 476 SystemTrayDelegate* delegate = WmShell::Get()->system_tray_delegate(); | 476 HideImeMenuBubble(); |
| 477 IMEInfoList list; | 477 ShowImeMenuBubble(); |
|
tdanderson
2016/11/30 23:04:15
I'm not sure that hiding and re-showing the bubble
Azure Wei
2016/12/01 00:33:30
The IME detailed view and opt-in menu shares the s
| |
| 478 delegate->GetAvailableIMEList(&list); | |
| 479 IMEPropertyInfoList property_list; | |
| 480 delegate->GetCurrentIMEProperties(&property_list); | |
| 481 ime_list_view_->Update(list, property_list, false, | |
| 482 ImeListView::SHOW_SINGLE_IME); | |
| 483 } | 478 } |
| 484 } | 479 } |
| 485 | 480 |
| 486 void ImeMenuTray::OnIMEMenuActivationChanged(bool is_activated) { | 481 void ImeMenuTray::OnIMEMenuActivationChanged(bool is_activated) { |
| 487 SetVisible(is_activated); | 482 SetVisible(is_activated); |
| 488 if (is_activated) | 483 if (is_activated) |
| 489 UpdateTrayLabel(); | 484 UpdateTrayLabel(); |
| 490 else | 485 else |
| 491 HideImeMenuBubble(); | 486 HideImeMenuBubble(); |
| 492 } | 487 } |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 561 WmShell::Get()->system_tray_delegate()->GetCurrentIME(¤t_ime_); | 556 WmShell::Get()->system_tray_delegate()->GetCurrentIME(¤t_ime_); |
| 562 | 557 |
| 563 // Updates the tray label based on the current input method. | 558 // Updates the tray label based on the current input method. |
| 564 if (current_ime_.third_party) | 559 if (current_ime_.third_party) |
| 565 label_->SetText(current_ime_.short_name + base::UTF8ToUTF16("*")); | 560 label_->SetText(current_ime_.short_name + base::UTF8ToUTF16("*")); |
| 566 else | 561 else |
| 567 label_->SetText(current_ime_.short_name); | 562 label_->SetText(current_ime_.short_name); |
| 568 } | 563 } |
| 569 | 564 |
| 570 } // namespace ash | 565 } // namespace ash |
| OLD | NEW |