Chromium Code Reviews| Index: chrome/browser/chromeos/input_method/candidate_window_controller_impl.cc |
| diff --git a/chrome/browser/chromeos/input_method/candidate_window_controller_impl.cc b/chrome/browser/chromeos/input_method/candidate_window_controller_impl.cc |
| index 1c84d3988b895173fd8b6b1841a272104866a5a8..69625877b3f4ef71185f25eea12acb0485875ffb 100644 |
| --- a/chrome/browser/chromeos/input_method/candidate_window_controller_impl.cc |
| +++ b/chrome/browser/chromeos/input_method/candidate_window_controller_impl.cc |
| @@ -12,6 +12,7 @@ |
| #include "ash/wm/window_util.h" |
| #include "base/logging.h" |
| #include "chrome/browser/chromeos/input_method/mode_indicator_controller.h" |
| +#include "chrome/browser/ui/ash/ash_util.h" |
| #include "ui/base/ime/ime_bridge.h" |
| #include "ui/chromeos/ime/infolist_window.h" |
| #include "ui/views/widget/widget.h" |
| @@ -44,12 +45,15 @@ void CandidateWindowControllerImpl::InitCandidateWindowView() { |
| if (candidate_window_view_) |
| return; |
| - aura::Window* active_window = ash::wm::GetActiveWindow(); |
| - candidate_window_view_ = |
| - new ui::ime::CandidateWindowView(ash::Shell::GetContainer( |
| - active_window ? active_window->GetRootWindow() |
| - : ash::Shell::GetTargetRootWindow(), |
| - ash::kShellWindowId_SettingBubbleContainer)); |
| + gfx::NativeView parent = nullptr; |
| + if (!chrome::IsRunningInMash()) { |
| + aura::Window* active_window = ash::wm::GetActiveWindow(); |
| + parent = ash::Shell::GetContainer( |
| + active_window ? active_window->GetRootWindow() |
| + : ash::Shell::GetTargetRootWindow(), |
| + ash::kShellWindowId_SettingBubbleContainer); |
| + } |
| + candidate_window_view_ = new ui::ime::CandidateWindowView(parent); |
|
sadrul
2017/01/23 18:20:11
Can you comment on how this candidate window will
Hadi
2017/01/23 21:11:34
Setting parent as null doesn't provide the same be
|
| candidate_window_view_->AddObserver(this); |
| candidate_window_view_->SetCursorBounds(cursor_bounds_, composition_head_); |
| views::Widget* widget = candidate_window_view_->InitWidget(); |