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

Side by Side Diff: ui/aura/desktop.cc

Issue 7943006: Initialize message pump not to use gtk. WindowSizer for aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: missing file 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/desktop.h ('k') | ui/gfx/screen_aura.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 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"
(...skipping 16 matching lines...) Expand all
27 host_->SetDesktop(this); 27 host_->SetDesktop(this);
28 DCHECK(compositor_.get()); 28 DCHECK(compositor_.get());
29 window_.reset(new internal::RootWindow); 29 window_.reset(new internal::RootWindow);
30 } 30 }
31 31
32 Desktop::~Desktop() { 32 Desktop::~Desktop() {
33 if (instance_ == this) 33 if (instance_ == this)
34 instance_ = NULL; 34 instance_ = NULL;
35 } 35 }
36 36
37 void Desktop::Init() {
38 window_->Init();
39 compositor()->set_root_layer(window_->layer());
40 #if defined(USE_X11)
41 // TODO(oshima): Implement configure notify and remove this.
42 OnHostResized(host_->GetSize());
43 #endif
44 }
45
37 void Desktop::Show() { 46 void Desktop::Show() {
38 host_->Show(); 47 host_->Show();
39 } 48 }
40 49
41 void Desktop::SetSize(const gfx::Size& size) { 50 void Desktop::SetSize(const gfx::Size& size) {
42 host_->SetSize(size); 51 host_->SetSize(size);
43 } 52 }
44 53
45 void Desktop::Run() { 54 void Desktop::Run() {
46 Show(); 55 Show();
(...skipping 22 matching lines...) Expand all
69 if (schedule_paint_.empty()) { 78 if (schedule_paint_.empty()) {
70 MessageLoop::current()->PostTask(FROM_HERE, 79 MessageLoop::current()->PostTask(FROM_HERE,
71 schedule_paint_.NewRunnableMethod(&Desktop::Draw)); 80 schedule_paint_.NewRunnableMethod(&Desktop::Draw));
72 } 81 }
73 } 82 }
74 83
75 // static 84 // static
76 Desktop* Desktop::GetInstance() { 85 Desktop* Desktop::GetInstance() {
77 if (!instance_) { 86 if (!instance_) {
78 instance_ = new Desktop; 87 instance_ = new Desktop;
79 instance_->window_->Init(); 88 instance_->Init();
80 instance_->compositor()->set_root_layer(instance_->window_->layer());
81 } 89 }
82 return instance_; 90 return instance_;
83 } 91 }
84 92
85 } // namespace aura 93 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/desktop.h ('k') | ui/gfx/screen_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698