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

Unified Diff: ash/shell.cc

Issue 9808026: Layout panels on top of their launcher icons (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pre-patch with tests Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index 4dfb4838fce40d72d4d890d1623a7930caf7b336..cf7828b33c033443671e5583951801553f970de6 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -160,18 +160,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",
@@ -530,6 +521,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_);
@@ -871,6 +863,8 @@ void Shell::CreateLauncher() {
launcher_->SetFocusCycler(focus_cycler_.get());
shelf_->SetLauncher(launcher_.get());
+ if (panel_layout_manager_ != NULL)
+ panel_layout_manager_->SetLauncher(launcher_.get());
launcher_->widget()->Show();
}
@@ -938,6 +932,19 @@ void Shell::InitLayoutManagers() {
int index = user_wallpaper_delegate_->GetUserWallpaperIndex();
desktop_background_controller_->SetDesktopBackgroundImageMode(
GetWallpaper(index), GetWallpaperInfo(index).layout);
+
+ // 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() {
« no previous file with comments | « ash/shell.h ('k') | ash/shell/window_watcher.h » ('j') | ash/wm/panel_layout_manager_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698