| Index: chrome/browser/ui/ash/launcher/extension_app_window_launcher_controller.cc
|
| diff --git a/chrome/browser/ui/ash/launcher/extension_app_window_launcher_controller.cc b/chrome/browser/ui/ash/launcher/extension_app_window_launcher_controller.cc
|
| index d3d80af4098e70cf967eb808caea1a26930810fd..bd74166389486201edc5425962a188c52bc5b271 100644
|
| --- a/chrome/browser/ui/ash/launcher/extension_app_window_launcher_controller.cc
|
| +++ b/chrome/browser/ui/ash/launcher/extension_app_window_launcher_controller.cc
|
| @@ -4,20 +4,29 @@
|
|
|
| #include "chrome/browser/ui/ash/launcher/extension_app_window_launcher_controller.h"
|
|
|
| +#include "ash/shelf/shelf.h"
|
| #include "ash/shelf/shelf_delegate.h"
|
| #include "ash/shelf/shelf_util.h"
|
| #include "ash/shell.h"
|
| +#include "ash/system/status_area_widget.h"
|
| +#include "ash/wm/window_state_aura.h"
|
| #include "ash/wm/window_util.h"
|
| #include "base/strings/stringprintf.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
|
| #include "chrome/browser/ui/ash/launcher/extension_app_window_launcher_item_controller.h"
|
| #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h"
|
| +#include "chrome/common/extensions/extension_constants.h"
|
| #include "extensions/browser/app_window/app_window.h"
|
| #include "extensions/browser/app_window/native_app_window.h"
|
| #include "extensions/common/extension.h"
|
| +#include "ui/aura/client/aura_constants.h"
|
| #include "ui/aura/window_event_dispatcher.h"
|
|
|
| +#if defined(OS_CHROMEOS)
|
| +#include "ash/system/chromeos/ime_menu/ime_menu_tray.h"
|
| +#endif // defined(OS_CHROMEOS)
|
| +
|
| using extensions::AppWindow;
|
| using extensions::AppWindowRegistry;
|
|
|
| @@ -109,6 +118,25 @@ void ExtensionAppWindowLauncherController::RegisterApp(AppWindow* app_window) {
|
| return;
|
|
|
| aura::Window* window = app_window->GetNativeWindow();
|
| +
|
| +#if defined(OS_CHROMEOS)
|
| + // IME window created by IME extension should also not register itself in the
|
| + // lanucher. Instead, is should show ImeMenuTray in the status tray.
|
| + if (extension_misc::IsImeMenuExtensionId(app_window->extension_id())) {
|
| + ash::Shelf* shelf = ash::Shelf::ForWindow(app_window->GetNativeWindow());
|
| + if (shelf) {
|
| + ash::ImeMenuTray* ime_menu_tray =
|
| + shelf->shelf_widget()->status_area_widget()->ime_menu_tray();
|
| + if (ime_menu_tray) {
|
| + ime_menu_tray->SetWindowState(ash::wm::GetWindowState(window));
|
| + // Sets the property of the window to indicate that the icon should be
|
| + // shown on the status area tray.
|
| + window->SetProperty(aura::client::kShowIconOnTrayKey, true);
|
| + }
|
| + }
|
| + return;
|
| + }
|
| +#endif // defined(OS_CHROMEOS)
|
| // Get the app's shelf identifier and add an entry to the map.
|
| DCHECK(window_to_app_shelf_id_map_.find(window) ==
|
| window_to_app_shelf_id_map_.end());
|
|
|