| Index: ash/common/system/chromeos/ime_menu/ime_menu_tray.cc
|
| diff --git a/ash/common/system/chromeos/ime_menu/ime_menu_tray.cc b/ash/common/system/chromeos/ime_menu/ime_menu_tray.cc
|
| index ab22727cc81659bdf33da0cdba67af095de09613..b98267b3ed70db7041fcef23d01e7fca5ec3e55a 100644
|
| --- a/ash/common/system/chromeos/ime_menu/ime_menu_tray.cc
|
| +++ b/ash/common/system/chromeos/ime_menu/ime_menu_tray.cc
|
| @@ -59,10 +59,10 @@
|
| int accessible_name_id,
|
| int message_id,
|
| int right_border) {
|
| - TrayPopupHeaderButton* button =
|
| - new TrayPopupHeaderButton(listener, enabled_resource_id,
|
| - disabled_resource_id, enabled_resource_id_hover,
|
| - disabled_resource_id_hover, accessible_name_id);
|
| + TrayPopupHeaderButton* button = new ash::TrayPopupHeaderButton(
|
| + listener, enabled_resource_id, disabled_resource_id,
|
| + enabled_resource_id_hover, disabled_resource_id_hover,
|
| + accessible_name_id);
|
| button->SetTooltipText(l10n_util::GetStringUTF16(message_id));
|
| button->SetBorder(views::Border::CreateSolidSidedBorder(0, 0, 0, right_border,
|
| kBorderDarkColor));
|
| @@ -159,7 +159,7 @@
|
|
|
| void ImeMenuTray::SetShelfAlignment(ShelfAlignment alignment) {
|
| TrayBackgroundView::SetShelfAlignment(alignment);
|
| - if (!MaterialDesignController::IsShelfMaterial())
|
| + if (!ash::MaterialDesignController::IsShelfMaterial())
|
| tray_container()->SetBorder(views::Border::NullBorder());
|
| }
|
|
|
| @@ -186,15 +186,6 @@
|
|
|
| void ImeMenuTray::OnIMERefresh() {
|
| UpdateTrayLabel();
|
| - if (bubble_ && ime_list_view_) {
|
| - SystemTrayDelegate* delegate = WmShell::Get()->system_tray_delegate();
|
| - IMEInfoList list;
|
| - delegate->GetAvailableIMEList(&list);
|
| - IMEPropertyInfoList property_list;
|
| - delegate->GetCurrentIMEProperties(&property_list);
|
| - ime_list_view_->Update(list, property_list, false,
|
| - ImeListView::SHOW_SINGLE_IME);
|
| - }
|
| }
|
|
|
| void ImeMenuTray::OnIMEMenuActivationChanged(bool is_activated) {
|
| @@ -206,6 +197,7 @@
|
| }
|
|
|
| void ImeMenuTray::BubbleViewDestroyed() {
|
| + SetDrawBackgroundAsActive(false);
|
| }
|
|
|
| void ImeMenuTray::OnMouseEnteredView() {}
|
| @@ -275,14 +267,14 @@
|
| bubble_view->set_margins(gfx::Insets(7, 0, 0, 0));
|
| bubble_view->SetArrowPaintType(views::BubbleBorder::PAINT_NONE);
|
|
|
| + ImeListView* ime_list_view =
|
| + new ImeListView(nullptr, false, ImeListView::SHOW_SINGLE_IME);
|
| + if (ime_list_view->scroll_content()->height() > GetImeListViewMaxHeight()) {
|
| + ime_list_view->scroller()->SetFixedSize(
|
| + gfx::Size(kTrayPopupMaxWidth, GetImeListViewMaxHeight()));
|
| + }
|
| // Adds IME list to the bubble.
|
| - ime_list_view_ =
|
| - new ImeListView(nullptr, false, ImeListView::SHOW_SINGLE_IME);
|
| - if (ime_list_view_->scroll_content()->height() > GetImeListViewMaxHeight()) {
|
| - ime_list_view_->scroller()->SetFixedSize(
|
| - gfx::Size(kTrayPopupMaxWidth, GetImeListViewMaxHeight()));
|
| - }
|
| - bubble_view->AddChildView(ime_list_view_);
|
| + bubble_view->AddChildView(ime_list_view);
|
|
|
| // Adds IME buttons to the bubble if needed.
|
| LoginStatus login =
|
| @@ -291,13 +283,12 @@
|
| !WmShell::Get()->GetSessionStateDelegate()->IsInSecondaryLoginScreen())
|
| bubble_view->AddChildView(new ImeButtonsView(false, false, false, true));
|
|
|
| - bubble_.reset(new TrayBubbleWrapper(this, bubble_view));
|
| + bubble_.reset(new ash::TrayBubbleWrapper(this, bubble_view));
|
| SetDrawBackgroundAsActive(true);
|
| }
|
|
|
| void ImeMenuTray::HideImeMenuBubble() {
|
| bubble_.reset();
|
| - ime_list_view_ = nullptr;
|
| SetDrawBackgroundAsActive(false);
|
| }
|
|
|
|
|