OLD | NEW |
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 } | 50 } |
51 | 51 |
52 void Desktop::Show() { | 52 void Desktop::Show() { |
53 host_->Show(); | 53 host_->Show(); |
54 } | 54 } |
55 | 55 |
56 void Desktop::SetSize(const gfx::Size& size) { | 56 void Desktop::SetSize(const gfx::Size& size) { |
57 host_->SetSize(size); | 57 host_->SetSize(size); |
58 } | 58 } |
59 | 59 |
| 60 void Desktop::SetCursor(CursorType cursor_type) { |
| 61 host_->SetCursor(cursor_type); |
| 62 } |
| 63 |
60 void Desktop::Run() { | 64 void Desktop::Run() { |
61 Show(); | 65 Show(); |
62 MessageLoopForUI::current()->Run(host_.get()); | 66 MessageLoopForUI::current()->Run(host_.get()); |
63 } | 67 } |
64 | 68 |
65 void Desktop::Draw() { | 69 void Desktop::Draw() { |
66 compositor_->Draw(false); | 70 compositor_->Draw(false); |
67 } | 71 } |
68 | 72 |
69 bool Desktop::OnMouseEvent(const MouseEvent& event) { | 73 bool Desktop::OnMouseEvent(const MouseEvent& event) { |
(...skipping 20 matching lines...) Expand all Loading... |
90 // static | 94 // static |
91 Desktop* Desktop::GetInstance() { | 95 Desktop* Desktop::GetInstance() { |
92 if (!instance_) { | 96 if (!instance_) { |
93 instance_ = new Desktop; | 97 instance_ = new Desktop; |
94 instance_->Init(); | 98 instance_->Init(); |
95 } | 99 } |
96 return instance_; | 100 return instance_; |
97 } | 101 } |
98 | 102 |
99 } // namespace aura | 103 } // namespace aura |
OLD | NEW |