diff options
author | bshe <bshe@chromium.org> | 2014-09-29 06:21:30 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-29 13:21:50 +0000 |
commit | c3875427bb19532a238608d7c04d34bc0fa22421 (patch) | |
tree | 0492374f15dab0a57c22e4b2afd4549837c36a07 /ash | |
parent | 14ddc7545c2821d8b10277565e0cab2bfff91168 (diff) | |
download | chromium_src-c3875427bb19532a238608d7c04d34bc0fa22421.zip chromium_src-c3875427bb19532a238608d7c04d34bc0fa22421.tar.gz chromium_src-c3875427bb19532a238608d7c04d34bc0fa22421.tar.bz2 |
Allow component IME extensions use app.window and add 'ime' boolean in CreateWindowOptions for app window
To create an IME window, an IME must be whitelisted, must have app.window.ime permission and must use set 'ime' and 'frame' this way:
chrome.app.window.create(url, {
'ime': true,
'frame': 'none
}, function() {})
Note only whitelisted component IME extensions can use this boolean parameter. See doc here: https://docs.google.com/a/google.com/document/d/1JQHpLu_RjN8C1Yi0i_eApS5SZtPoMDqvlq06YOwXCFU/edit
BUG=401984
Review URL: https://codereview.chromium.org/503383002
Cr-Commit-Position: refs/heads/master@{#297163}
Diffstat (limited to 'ash')
-rw-r--r-- | ash/root_window_controller.cc | 12 | ||||
-rw-r--r-- | ash/shell_unittest.cc | 4 | ||||
-rw-r--r-- | ash/shell_window_ids.h | 8 |
3 files changed, 11 insertions, 13 deletions
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc index 1812e84..3e40968 100644 --- a/ash/root_window_controller.cc +++ b/ash/root_window_controller.cc @@ -641,8 +641,7 @@ void RootWindowController::ActivateKeyboard( keyboard_controller->AddObserver(docked_layout_manager_); keyboard_controller->AddObserver(workspace_controller_->layout_manager()); Shell::GetInstance()->delegate()->VirtualKeyboardActivated(true); - aura::Window* parent = GetContainer( - kShellWindowId_VirtualKeyboardParentContainer); + aura::Window* parent = GetContainer(kShellWindowId_ImeWindowParentContainer); DCHECK(parent); aura::Window* keyboard_container = keyboard_controller->GetContainerWindow(); @@ -662,8 +661,8 @@ void RootWindowController::DeactivateKeyboard( aura::Window* keyboard_container = keyboard_controller->GetContainerWindow(); if (keyboard_container->GetRootWindow() == GetRootWindow()) { - aura::Window* parent = GetContainer( - kShellWindowId_VirtualKeyboardParentContainer); + aura::Window* parent = + GetContainer(kShellWindowId_ImeWindowParentContainer); DCHECK(parent); parent->RemoveChild(keyboard_container); // Virtual keyboard may be deactivated while still showing, notify all @@ -679,8 +678,7 @@ void RootWindowController::DeactivateKeyboard( } bool RootWindowController::IsVirtualKeyboardWindow(aura::Window* window) { - aura::Window* parent = GetContainer( - kShellWindowId_VirtualKeyboardParentContainer); + aura::Window* parent = GetContainer(kShellWindowId_ImeWindowParentContainer); return parent ? parent->Contains(window) : false; } @@ -1002,7 +1000,7 @@ void RootWindowController::CreateContainersInRootWindow( DescendantShouldStayInSameRootWindow(settings_bubble_container); aura::Window* virtual_keyboard_parent_container = - CreateContainer(kShellWindowId_VirtualKeyboardParentContainer, + CreateContainer(kShellWindowId_ImeWindowParentContainer, "VirtualKeyboardParentContainer", lock_screen_related_containers); wm::SetSnapsChildrenToPhysicalPixelBoundary( diff --git a/ash/shell_unittest.cc b/ash/shell_unittest.cc index aafb8cd..98983d9 100644 --- a/ash/shell_unittest.cc +++ b/ash/shell_unittest.cc @@ -81,8 +81,8 @@ void ExpectAllContainers() { Shell::GetContainer(root_window, kShellWindowId_SettingBubbleContainer)); EXPECT_TRUE( Shell::GetContainer(root_window, kShellWindowId_OverlayContainer)); - EXPECT_TRUE(Shell::GetContainer( - root_window, kShellWindowId_VirtualKeyboardParentContainer)); + EXPECT_TRUE(Shell::GetContainer(root_window, + kShellWindowId_ImeWindowParentContainer)); #if defined(OS_CHROMEOS) EXPECT_TRUE( Shell::GetContainer(root_window, kShellWindowId_MouseCursorContainer)); diff --git a/ash/shell_window_ids.h b/ash/shell_window_ids.h index 1732887..88a923b 100644 --- a/ash/shell_window_ids.h +++ b/ash/shell_window_ids.h @@ -73,10 +73,10 @@ const int kShellWindowId_LockSystemModalContainer = 16; // The container for the status area. const int kShellWindowId_StatusContainer = 17; -// A parent container that holds the virtual keyboard container. This is to -// ensure that the virtual keyboard is stacked above most containers but below -// the mouse cursor, context menus and the power off animation. -const int kShellWindowId_VirtualKeyboardParentContainer = 18; +// A parent container that holds the virtual keyboard container and ime windows +// if any. This is to ensure that the virtual keyboard or ime window is stacked +// above most containers but below the mouse cursor and the power off animation. +const int kShellWindowId_ImeWindowParentContainer = 18; // The container for menus. const int kShellWindowId_MenuContainer = 19; |