Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Side by Side Diff: ash/root_window_controller.cc

Issue 13164002: Create and show the virtual keyboard. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/root_window_controller.h" 5 #include "ash/root_window_controller.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/ash_constants.h" 9 #include "ash/ash_constants.h"
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #include "ui/aura/window_observer.h" 46 #include "ui/aura/window_observer.h"
47 #include "ui/aura/window_tracker.h" 47 #include "ui/aura/window_tracker.h"
48 #include "ui/base/models/menu_model.h" 48 #include "ui/base/models/menu_model.h"
49 #include "ui/gfx/display.h" 49 #include "ui/gfx/display.h"
50 #include "ui/gfx/screen.h" 50 #include "ui/gfx/screen.h"
51 #include "ui/views/controls/menu/menu_model_adapter.h" 51 #include "ui/views/controls/menu/menu_model_adapter.h"
52 #include "ui/views/controls/menu/menu_runner.h" 52 #include "ui/views/controls/menu/menu_runner.h"
53 #include "ui/views/corewm/visibility_controller.h" 53 #include "ui/views/corewm/visibility_controller.h"
54 #include "ui/views/view_model.h" 54 #include "ui/views/view_model.h"
55 #include "ui/views/view_model_utils.h" 55 #include "ui/views/view_model_utils.h"
56 #include "ui/virtual_keyboard/virtual_keyboard_controller.h"
56 57
57 namespace ash { 58 namespace ash {
58 namespace { 59 namespace {
59 60
60 // Duration for the animation that hides the boot splash screen, in 61 // Duration for the animation that hides the boot splash screen, in
61 // milliseconds. This should be short enough in relation to 62 // milliseconds. This should be short enough in relation to
62 // wm/window_animation.cc's brightness/grayscale fade animation that the login 63 // wm/window_animation.cc's brightness/grayscale fade animation that the login
63 // background image animation isn't hidden by the splash screen animation. 64 // background image animation isn't hidden by the splash screen animation.
64 const int kBootSplashScreenHideDurationMs = 500; 65 const int kBootSplashScreenHideDurationMs = 500;
65 66
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 RootWindowController::RootWindowController(aura::RootWindow* root_window) 167 RootWindowController::RootWindowController(aura::RootWindow* root_window)
167 : root_window_(root_window), 168 : root_window_(root_window),
168 root_window_layout_(NULL), 169 root_window_layout_(NULL),
169 shelf_(NULL), 170 shelf_(NULL),
170 panel_layout_manager_(NULL) { 171 panel_layout_manager_(NULL) {
171 SetRootWindowController(root_window, this); 172 SetRootWindowController(root_window, this);
172 screen_dimmer_.reset(new ScreenDimmer(root_window)); 173 screen_dimmer_.reset(new ScreenDimmer(root_window));
173 174
174 stacking_controller_.reset(new ash::StackingController); 175 stacking_controller_.reset(new ash::StackingController);
175 aura::client::SetStackingClient(root_window, stacking_controller_.get()); 176 aura::client::SetStackingClient(root_window, stacking_controller_.get());
177
178 virtual_keyboard::VirtualKeyboardControllerProxy* proxy =
179 Shell::GetInstance()->delegate()->CreateVirtualKeyboardControllerProxy();
180 virtual_keyboard_controller_.reset(
181 new virtual_keyboard::VirtualKeyboardController(proxy));
176 } 182 }
177 183
178 RootWindowController::~RootWindowController() { 184 RootWindowController::~RootWindowController() {
179 Shutdown(); 185 Shutdown();
180 root_window_.reset(); 186 root_window_.reset();
181 } 187 }
182 188
183 // static 189 // static
184 RootWindowController* RootWindowController::ForLauncher(aura::Window* window) { 190 RootWindowController* RootWindowController::ForLauncher(aura::Window* window) {
185 if (Shell::IsLauncherPerDisplayEnabled()) 191 if (Shell::IsLauncherPerDisplayEnabled())
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 GetContainer(kShellWindowId_DefaultContainer); 261 GetContainer(kShellWindowId_DefaultContainer);
256 // Workspace manager has its own layout managers. 262 // Workspace manager has its own layout managers.
257 workspace_controller_.reset( 263 workspace_controller_.reset(
258 new WorkspaceController(default_container)); 264 new WorkspaceController(default_container));
259 265
260 aura::Window* always_on_top_container = 266 aura::Window* always_on_top_container =
261 GetContainer(kShellWindowId_AlwaysOnTopContainer); 267 GetContainer(kShellWindowId_AlwaysOnTopContainer);
262 always_on_top_container->SetLayoutManager( 268 always_on_top_container->SetLayoutManager(
263 new BaseLayoutManager( 269 new BaseLayoutManager(
264 always_on_top_container->GetRootWindow())); 270 always_on_top_container->GetRootWindow()));
271
272 // FIXME(bryeung): where is the right place for this?
273 aura::Window* keyboard_container = virtual_keyboard_controller_->Init();
274 // FIXME(bryeung): how to keep it full-screen?
275 root_window()->AddChild(keyboard_container);
276 // FIXME(bryeung): how to keep it on top?
277 root_window()->StackChildAtTop(keyboard_container);
265 } 278 }
266 279
267 void RootWindowController::InitForPrimaryDisplay() { 280 void RootWindowController::InitForPrimaryDisplay() {
268 DCHECK(!shelf_.get()); 281 DCHECK(!shelf_.get());
269 aura::Window* shelf_container = 282 aura::Window* shelf_container =
270 GetContainer(ash::internal::kShellWindowId_ShelfContainer); 283 GetContainer(ash::internal::kShellWindowId_ShelfContainer);
271 // TODO(harrym): Remove when status area is view. 284 // TODO(harrym): Remove when status area is view.
272 aura::Window* status_container = 285 aura::Window* status_container =
273 GetContainer(ash::internal::kShellWindowId_StatusContainer); 286 GetContainer(ash::internal::kShellWindowId_StatusContainer);
274 shelf_.reset(new ash::ShelfWidget( 287 shelf_.reset(new ash::ShelfWidget(
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 kShellWindowId_DragImageAndTooltipContainer, 630 kShellWindowId_DragImageAndTooltipContainer,
618 "DragImageAndTooltipContainer", 631 "DragImageAndTooltipContainer",
619 lock_screen_related_containers); 632 lock_screen_related_containers);
620 views::corewm::SetChildWindowVisibilityChangesAnimated(drag_drop_container); 633 views::corewm::SetChildWindowVisibilityChangesAnimated(drag_drop_container);
621 SetUsesScreenCoordinates(drag_drop_container); 634 SetUsesScreenCoordinates(drag_drop_container);
622 635
623 aura::Window* overlay_container = CreateContainer( 636 aura::Window* overlay_container = CreateContainer(
624 kShellWindowId_OverlayContainer, 637 kShellWindowId_OverlayContainer,
625 "OverlayContainer", 638 "OverlayContainer",
626 lock_screen_related_containers); 639 lock_screen_related_containers);
627 SetUsesScreenCoordinates(overlay_container); 640 SetUsesScreenCoordinates(overlay_container);
sadrul 2013/03/28 19:17:00 I think you can get the keyboard-container here, a
bryeung 2013/04/02 15:56:53 This can't go here yet, as we're creating the Keyb
628 641
629 CreateContainer(kShellWindowId_PowerButtonAnimationContainer, 642 CreateContainer(kShellWindowId_PowerButtonAnimationContainer,
630 "PowerButtonAnimationContainer", root_window) ; 643 "PowerButtonAnimationContainer", root_window) ;
631 } 644 }
632 645
633 } // namespace internal 646 } // namespace internal
634 } // namespace ash 647 } // namespace ash
OLDNEW
« no previous file with comments | « ash/root_window_controller.h ('k') | ash/shell_delegate.h » ('j') | ash/shell_delegate.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698