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

Unified Diff: ui/aura_shell/desktop_window.cc

Issue 7970001: Better Z-index support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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: ui/aura_shell/desktop_window.cc
===================================================================
--- ui/aura_shell/desktop_window.cc (revision 0)
+++ ui/aura_shell/desktop_window.cc (revision 0)
@@ -0,0 +1,42 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/aura/desktop.h"
+#include "ui/aura/toplevel_window_container.h"
+#include "ui/aura/window.h"
+#include "ui/aura_shell/desktop_layout_manager.h"
+#include "ui/aura_shell/shell_factory.h"
+
+namespace aura_shell {
+
+namespace internal {
+
+aura::Window* CreateToplevelWindowContainer() {
+ aura::Window* container = new aura::internal::ToplevelWindowContainer;
+ container->Init();
+ container->SetBounds(gfx::Rect(0, 0, 1024, 768), 0);
+ container->SetVisibility(aura::Window::VISIBILITY_SHOWN);
+ container->SetParent(aura::Desktop::GetInstance()->window());
+ aura::Desktop::GetInstance()->set_toplevel_window_container(container);
+ return container;
+}
+
+} // namespace internal
+
+void InitDesktopWindow() {
+ aura::Window* desktop_window = aura::Desktop::GetInstance()->window();
+ internal::DesktopLayoutManager* desktop_layout =
+ new internal::DesktopLayoutManager(desktop_window);
+ desktop_window->SetLayoutManager(desktop_layout);
+
+ // The order of creation here is important to establish the z-index:
+ desktop_layout->set_background_widget(internal::CreateDesktopBackground());
+ desktop_layout->set_toplevel_window_container(
+ internal::CreateToplevelWindowContainer());
+ desktop_layout->set_launcher_widget(internal::CreateLauncher());
+ desktop_layout->set_status_area_widget(internal::CreateStatusArea());
+}
+
+} // namespace aura_shell
+
Property changes on: ui\aura_shell\desktop_window.cc
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698