| Index: ash/system/ime_menu/ime_menu_tray.cc
|
| diff --git a/ash/system/ime_menu/ime_menu_tray.cc b/ash/system/ime_menu/ime_menu_tray.cc
|
| index d2f07f4228a0aa235c6bce2ad04c34ec0a0ee8a1..8ce578885796987f81bd2424eed756ff7c3bc811 100644
|
| --- a/ash/system/ime_menu/ime_menu_tray.cc
|
| +++ b/ash/system/ime_menu/ime_menu_tray.cc
|
| @@ -6,7 +6,6 @@
|
|
|
| #include "ash/accessibility_delegate.h"
|
| #include "ash/ash_constants.h"
|
| -#include "ash/public/cpp/shell_window_ids.h"
|
| #include "ash/resources/grit/ash_resources.h"
|
| #include "ash/root_window_controller.h"
|
| #include "ash/session/session_controller.h"
|
| @@ -323,13 +322,17 @@ void ImeMenuTray::ShowImeMenuBubble() {
|
| }
|
|
|
| void ImeMenuTray::ShowImeMenuBubbleInternal() {
|
| - views::TrayBubbleView::InitParams init_params(
|
| - GetAnchorAlignment(), kTrayMenuMinimumWidth, kTrayMenuMinimumWidth);
|
| + views::TrayBubbleView::InitParams init_params;
|
| + init_params.delegate = this;
|
| + init_params.parent_window = GetBubbleWindowContainer();
|
| + init_params.anchor_view = GetBubbleAnchor();
|
| + init_params.anchor_alignment = GetAnchorAlignment();
|
| + init_params.min_width = kTrayMenuMinimumWidth;
|
| + init_params.max_width = kTrayMenuMinimumWidth;
|
| init_params.can_activate = true;
|
| init_params.close_on_deactivate = true;
|
|
|
| - views::TrayBubbleView* bubble_view =
|
| - views::TrayBubbleView::Create(GetBubbleAnchor(), this, &init_params);
|
| + views::TrayBubbleView* bubble_view = new views::TrayBubbleView(init_params);
|
| bubble_view->set_anchor_view_insets(GetBubbleAnchorInsets());
|
|
|
| // Add a title item with a separator on the top of the IME menu.
|
| @@ -471,16 +474,6 @@ base::string16 ImeMenuTray::GetAccessibleNameForBubble() {
|
| return l10n_util::GetStringUTF16(IDS_ASH_IME_MENU_ACCESSIBLE_NAME);
|
| }
|
|
|
| -void ImeMenuTray::OnBeforeBubbleWidgetInit(
|
| - views::Widget* anchor_widget,
|
| - views::Widget* bubble_widget,
|
| - views::Widget::InitParams* params) const {
|
| - // Place the bubble in the same root window as |anchor_widget|.
|
| - RootWindowController::ForWindow(anchor_widget->GetNativeWindow())
|
| - ->ConfigureWidgetInitParamsForContainer(
|
| - bubble_widget, kShellWindowId_SettingBubbleContainer, params);
|
| -}
|
| -
|
| void ImeMenuTray::HideBubble(const views::TrayBubbleView* bubble_view) {
|
| HideBubbleWithView(bubble_view);
|
| }
|
|
|