Commit c875d637 authored by Tim Song's avatar Tim Song Committed by Commit Bot

Ash Tray: Fix IME detailed view not updating based on current IME.

The problem was that the controller was not registering itself as an observer.

BUG=682890

Change-Id: Ic37a692c2879069734d25eaf38f7f5448bcb212f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1565372Reviewed-by: default avatarTetsui Ohkubo <tetsui@chromium.org>
Reviewed-by: default avatarTim Song <tengs@chromium.org>
Commit-Queue: Tim Song <tengs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#650471}
parent ca7d3b0c
......@@ -9,6 +9,7 @@
#include "ash/shell.h"
#include "ash/system/ime/tray_ime_chromeos.h"
#include "ash/system/tray/detailed_view_delegate.h"
#include "ash/system/tray/system_tray_notifier.h"
namespace ash {
......@@ -25,9 +26,17 @@ ImeListView::SingleImeBehavior GetSingleImeBehavior() {
UnifiedIMEDetailedViewController::UnifiedIMEDetailedViewController(
UnifiedSystemTrayController* tray_controller)
: detailed_view_delegate_(
std::make_unique<DetailedViewDelegate>(tray_controller)) {}
std::make_unique<DetailedViewDelegate>(tray_controller)) {
Shell::Get()->system_tray_notifier()->AddIMEObserver(this);
Shell::Get()->system_tray_notifier()->AddVirtualKeyboardObserver(this);
Shell::Get()->accessibility_controller()->AddObserver(this);
}
UnifiedIMEDetailedViewController::~UnifiedIMEDetailedViewController() {}
UnifiedIMEDetailedViewController::~UnifiedIMEDetailedViewController() {
Shell::Get()->system_tray_notifier()->RemoveIMEObserver(this);
Shell::Get()->system_tray_notifier()->RemoveVirtualKeyboardObserver(this);
Shell::Get()->accessibility_controller()->RemoveObserver(this);
}
views::View* UnifiedIMEDetailedViewController::CreateView() {
DCHECK(!view_);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment