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

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

Issue 8194004: change the way windows are parented when their parent is set to NULL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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_background_view.cc ('k') | ui/aura_shell/launcher/launcher_view.cc » ('j') | 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 #include "ui/aura_shell/shell_window_ids.h" 10 #include "ui/aura_shell/shell_window_ids.h"
11 #include "views/widget/widget.h" 11 #include "views/widget/widget.h"
12 12
13 namespace aura_shell { 13 namespace aura_shell {
14 14
15 // Creates each of the special window containers that holds windows of various 15 // Creates each of the special window containers that holds windows of various
16 // types in the shell UI. They are added to |containers| from back to front in 16 // types in the shell UI. They are added to |containers| from back to front in
17 // the z-index. 17 // the z-index.
18 void CreateSpecialContainers(aura::Window::Windows* containers) { 18 void CreateSpecialContainers(aura::Window::Windows* containers) {
19 aura::Window* background_container = new aura::Window(NULL); 19 aura::Window* background_container = new aura::Window(NULL);
20 background_container->set_id( 20 background_container->set_id(
21 internal::kShellWindowId_DesktopBackgroundContainer); 21 internal::kShellWindowId_DesktopBackgroundContainer);
22 containers->push_back(background_container); 22 containers->push_back(background_container);
23 23
24 aura::Window* default_container = new aura::internal::ToplevelWindowContainer; 24 aura::Window* default_container = new aura::ToplevelWindowContainer;
25 default_container->set_id(internal::kShellWindowId_DefaultContainer); 25 default_container->set_id(internal::kShellWindowId_DefaultContainer);
26 aura::Desktop::GetInstance()->set_default_parent(default_container);
27 containers->push_back(default_container); 26 containers->push_back(default_container);
28 27
29 aura::Window* always_on_top_container = 28 aura::Window* always_on_top_container = new aura::ToplevelWindowContainer;
30 new aura::internal::ToplevelWindowContainer;
31 always_on_top_container->set_id( 29 always_on_top_container->set_id(
32 internal::kShellWindowId_AlwaysOnTopContainer); 30 internal::kShellWindowId_AlwaysOnTopContainer);
33 containers->push_back(always_on_top_container); 31 containers->push_back(always_on_top_container);
34 32
35 aura::Window* launcher_container = new aura::Window(NULL); 33 aura::Window* launcher_container = new aura::Window(NULL);
36 launcher_container->set_id(internal::kShellWindowId_LauncherContainer); 34 launcher_container->set_id(internal::kShellWindowId_LauncherContainer);
37 containers->push_back(launcher_container); 35 containers->push_back(launcher_container);
38 36
39 aura::Window* lock_container = new aura::Window(NULL); 37 aura::Window* lock_container = new aura::Window(NULL);
40 lock_container->set_stops_event_propagation(true); 38 lock_container->set_stops_event_propagation(true);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 internal::kShellWindowId_StatusContainer)->AddChild( 74 internal::kShellWindowId_StatusContainer)->AddChild(
77 status_area->GetNativeView()); 75 status_area->GetNativeView());
78 76
79 desktop_layout->set_background_widget(desktop_background); 77 desktop_layout->set_background_widget(desktop_background);
80 desktop_layout->set_launcher_widget(launcher); 78 desktop_layout->set_launcher_widget(launcher);
81 desktop_layout->set_status_area_widget(status_area); 79 desktop_layout->set_status_area_widget(status_area);
82 } 80 }
83 81
84 } // namespace aura_shell 82 } // namespace aura_shell
85 83
OLDNEW
« no previous file with comments | « ui/aura_shell/desktop_background_view.cc ('k') | ui/aura_shell/launcher/launcher_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698