summaryrefslogtreecommitdiffstats
path: root/ash/shell.cc
diff options
context:
space:
mode:
authordcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-21 00:07:33 +0000
committerdcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-21 00:07:33 +0000
commit1eb18d93bae4e4d346da0a91acc62b1761a84b38 (patch)
tree78e4bd4b736fd060cd1f1ce6dd45412ae0bb0307 /ash/shell.cc
parent77f93a0fee5d33d31c4a28443f576f38b845194a (diff)
downloadchromium_src-1eb18d93bae4e4d346da0a91acc62b1761a84b38.zip
chromium_src-1eb18d93bae4e4d346da0a91acc62b1761a84b38.tar.gz
chromium_src-1eb18d93bae4e4d346da0a91acc62b1761a84b38.tar.bz2
Draw panels above their launcher icons.
Note that this patch doesn't handle dragging panels to rearrange them (if we want that at all) and panels with no launcher icon because they are in overflow. BUG=124115 TEST=aura_shell_unittests --gtest_filter=*Panel* --aura-panels Review URL: https://chromiumcodereview.appspot.com/10091017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133309 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shell.cc')
-rw-r--r--ash/shell.cc31
1 files changed, 19 insertions, 12 deletions
diff --git a/ash/shell.cc b/ash/shell.cc
index 8f4b072..4fbc9ef 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -162,18 +162,9 @@ void CreateSpecialContainers(aura::RootWindow* root_window) {
new ToplevelWindowEventFilter(always_on_top_container));
SetChildWindowVisibilityChangesAnimated(always_on_top_container);
- aura::Window* panel_container = CreateContainer(
- internal::kShellWindowId_PanelContainer,
- "PanelContainer",
- non_lock_screen_containers);
- if (CommandLine::ForCurrentProcess()->
- HasSwitch(switches::kAuraPanelManager)) {
- internal::PanelLayoutManager* layout_manager =
- new internal::PanelLayoutManager(panel_container);
- panel_container->SetEventFilter(
- new internal::PanelWindowEventFilter(panel_container, layout_manager));
- panel_container->SetLayoutManager(layout_manager);
- }
+ CreateContainer(internal::kShellWindowId_PanelContainer,
+ "PanelContainer",
+ non_lock_screen_containers);
CreateContainer(internal::kShellWindowId_AppListContainer,
"AppListContainer",
@@ -538,6 +529,7 @@ Shell::Shell(ShellDelegate* delegate)
root_filter_(NULL),
delegate_(delegate),
shelf_(NULL),
+ panel_layout_manager_(NULL),
root_window_layout_(NULL),
status_widget_(NULL) {
gfx::Screen::SetInstance(screen_);
@@ -884,6 +876,8 @@ void Shell::CreateLauncher() {
launcher_->SetFocusCycler(focus_cycler_.get());
shelf_->SetLauncher(launcher_.get());
+ if (panel_layout_manager_)
+ panel_layout_manager_->SetLauncher(launcher_.get());
launcher_->widget()->Show();
}
@@ -951,6 +945,19 @@ void Shell::InitLayoutManagers() {
// Create desktop background widget.
desktop_background_controller_->SetDesktopBackgroundImageMode();
+
+ // Create Panel layout manager
+ if (CommandLine::ForCurrentProcess()->
+ HasSwitch(switches::kAuraPanelManager)) {
+ aura::Window* panel_container = GetContainer(
+ internal::kShellWindowId_PanelContainer);
+ panel_layout_manager_ =
+ new internal::PanelLayoutManager(panel_container);
+ panel_container->SetEventFilter(
+ new internal::PanelWindowEventFilter(
+ panel_container, panel_layout_manager_));
+ panel_container->SetLayoutManager(panel_layout_manager_);
+ }
}
void Shell::DisableWorkspaceGridLayout() {