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

Side by Side Diff: ui/aura/desktop.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
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 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "ui/aura/desktop_host.h" 9 #include "ui/aura/desktop_host.h"
10 #include "ui/aura/root_window.h" 10 #include "ui/aura/root_window.h"
11 #include "ui/aura/window.h" 11 #include "ui/aura/window.h"
12 #include "ui/gfx/compositor/compositor.h" 12 #include "ui/gfx/compositor/compositor.h"
13 #include "ui/gfx/compositor/layer.h" 13 #include "ui/gfx/compositor/layer.h"
14 14
15 namespace aura { 15 namespace aura {
16 16
17 // static 17 // static
18 Desktop* Desktop::instance_ = NULL; 18 Desktop* Desktop::instance_ = NULL;
19 19
20 Desktop::Desktop() 20 Desktop::Desktop()
21 : host_(aura::DesktopHost::Create(gfx::Rect(200, 200, 1280, 1024))), 21 : toplevel_window_container_(NULL),
22 host_(aura::DesktopHost::Create(gfx::Rect(200, 200, 1280, 1024))),
22 ALLOW_THIS_IN_INITIALIZER_LIST(schedule_paint_(this)) { 23 ALLOW_THIS_IN_INITIALIZER_LIST(schedule_paint_(this)) {
23 DCHECK(MessageLoopForUI::current()) 24 DCHECK(MessageLoopForUI::current())
24 << "The UI message loop must be initialized first."; 25 << "The UI message loop must be initialized first.";
25 compositor_ = ui::Compositor::Create(this, host_->GetAcceleratedWidget(), 26 compositor_ = ui::Compositor::Create(this, host_->GetAcceleratedWidget(),
26 host_->GetSize()); 27 host_->GetSize());
27 host_->SetDesktop(this); 28 host_->SetDesktop(this);
28 DCHECK(compositor_.get()); 29 DCHECK(compositor_.get());
29 window_.reset(new internal::RootWindow); 30 window_.reset(new internal::RootWindow);
30 } 31 }
31 32
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 Desktop* Desktop::GetInstance() { 77 Desktop* Desktop::GetInstance() {
77 if (!instance_) { 78 if (!instance_) {
78 instance_ = new Desktop; 79 instance_ = new Desktop;
79 instance_->window_->Init(); 80 instance_->window_->Init();
80 instance_->compositor()->set_root_layer(instance_->window_->layer()); 81 instance_->compositor()->set_root_layer(instance_->window_->layer());
81 } 82 }
82 return instance_; 83 return instance_;
83 } 84 }
84 85
85 } // namespace aura 86 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698