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

Side by Side Diff: ui/aura_shell/desktop_window.cc

Issue 7980023: Fixes aura unit tests. There were a couple of problems: (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
« no previous file with comments | « ui/aura_shell/desktop_layout_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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 "ui/aura/desktop.h" 5 #include "ui/aura/desktop.h"
6 #include "ui/aura/toplevel_window_container.h" 6 #include "ui/aura/toplevel_window_container.h"
7 #include "ui/aura/window.h" 7 #include "ui/aura/window.h"
8 #include "ui/aura_shell/desktop_layout_manager.h" 8 #include "ui/aura_shell/desktop_layout_manager.h"
9 #include "ui/aura_shell/shell_factory.h" 9 #include "ui/aura_shell/shell_factory.h"
10 10
11 namespace aura_shell { 11 namespace aura_shell {
12 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() { 13 void InitDesktopWindow() {
28 aura::Window* desktop_window = aura::Desktop::GetInstance()->window(); 14 aura::Window* desktop_window = aura::Desktop::GetInstance()->window();
29 internal::DesktopLayoutManager* desktop_layout = 15 internal::DesktopLayoutManager* desktop_layout =
30 new internal::DesktopLayoutManager(desktop_window); 16 new internal::DesktopLayoutManager(desktop_window);
31 desktop_window->SetLayoutManager(desktop_layout); 17 desktop_window->SetLayoutManager(desktop_layout);
32 18
33 // The order of creation here is important to establish the z-index: 19 // The order of creation here is important to establish the z-index:
34 desktop_layout->set_background_widget(internal::CreateDesktopBackground()); 20 desktop_layout->set_background_widget(internal::CreateDesktopBackground());
35 desktop_layout->set_toplevel_window_container( 21 desktop_layout->set_toplevel_window_container(
36 internal::CreateToplevelWindowContainer()); 22 aura::Desktop::GetInstance()->toplevel_window_container());
23 desktop_window->MoveChildToFront(
24 aura::Desktop::GetInstance()->toplevel_window_container());
37 desktop_layout->set_launcher_widget(internal::CreateLauncher()); 25 desktop_layout->set_launcher_widget(internal::CreateLauncher());
38 desktop_layout->set_status_area_widget(internal::CreateStatusArea()); 26 desktop_layout->set_status_area_widget(internal::CreateStatusArea());
39 } 27 }
40 28
41 } // namespace aura_shell 29 } // namespace aura_shell
42 30
OLDNEW
« no previous file with comments | « ui/aura_shell/desktop_layout_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698