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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ui/aura/desktop.h"
6 #include "ui/aura/toplevel_window_container.h"
7 #include "ui/aura/window.h"
8 #include "ui/aura_shell/desktop_layout_manager.h"
9 #include "ui/aura_shell/shell_factory.h"
10
11 namespace aura_shell {
12
13 namespace internal {
14
15 aura::Window* CreateToplevelWindowContainer() {
16 aura::Window* container = new aura::internal::ToplevelWindowContainer;
17 container->Init();
18 container->SetBounds(gfx::Rect(0, 0, 1024, 768), 0);
19 container->SetVisibility(aura::Window::VISIBILITY_SHOWN);
20 container->SetParent(aura::Desktop::GetInstance()->window());
21 aura::Desktop::GetInstance()->set_toplevel_window_container(container);
22 return container;
23 }
24
25 } // namespace internal
26
27 void InitDesktopWindow() {
28 aura::Window* desktop_window = aura::Desktop::GetInstance()->window();
29 internal::DesktopLayoutManager* desktop_layout =
30 new internal::DesktopLayoutManager(desktop_window);
31 desktop_window->SetLayoutManager(desktop_layout);
32
33 // The order of creation here is important to establish the z-index:
34 desktop_layout->set_background_widget(internal::CreateDesktopBackground());
35 desktop_layout->set_toplevel_window_container(
36 internal::CreateToplevelWindowContainer());
37 desktop_layout->set_launcher_widget(internal::CreateLauncher());
38 desktop_layout->set_status_area_widget(internal::CreateStatusArea());
39 }
40
41 } // namespace aura_shell
42
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698