summaryrefslogtreecommitdiffstats
path: root/aura/desktop.cc
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-25 21:44:29 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-25 21:44:29 +0000
commit50bde0387560560e711ca9ec376b0f7734ea5054 (patch)
treef86cbfebbb14d200672737f1d49895b3974b7546 /aura/desktop.cc
parent31fd99b24c73754eac6e6417ce76ada710166b69 (diff)
downloadchromium_src-50bde0387560560e711ca9ec376b0f7734ea5054.zip
chromium_src-50bde0387560560e711ca9ec376b0f7734ea5054.tar.gz
chromium_src-50bde0387560560e711ca9ec376b0f7734ea5054.tar.bz2
Revert 98306 - Create a new views_aura_desktop.
Get views::Widget rendering working against an aura::Window NativeWidget. http://crbug.com/93944 TEST=none Review URL: http://codereview.chromium.org/7741027 TBR=ben@chromium.org Review URL: http://codereview.chromium.org/7749020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98312 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'aura/desktop.cc')
-rw-r--r--aura/desktop.cc29
1 files changed, 3 insertions, 26 deletions
diff --git a/aura/desktop.cc b/aura/desktop.cc
index f427daf..00b130f 100644
--- a/aura/desktop.cc
+++ b/aura/desktop.cc
@@ -4,35 +4,21 @@
#include "aura/desktop.h"
-#include "aura/desktop_host.h"
#include "aura/window.h"
#include "base/logging.h"
-#include "base/message_loop.h"
#include "ui/gfx/compositor/compositor.h"
namespace aura {
-// static
-Desktop* Desktop::instance_ = NULL;
-
-Desktop::Desktop()
- : host_(aura::DesktopHost::Create(gfx::Rect(200, 200, 1024, 768))) {
- compositor_ = ui::Compositor::Create(host_->GetAcceleratedWidget(),
- host_->GetSize());
- host_->SetDesktop(this);
+Desktop::Desktop(gfx::AcceleratedWidget widget, const gfx::Size& size)
+ : compositor_(ui::Compositor::Create(widget, size)) {
DCHECK(compositor_.get());
- window_.reset(new Window(NULL));
+ window_.reset(new Window(this));
}
Desktop::~Desktop() {
}
-void Desktop::Run() {
- host_->Show();
- MessageLoop main_message_loop(MessageLoop::TYPE_UI);
- MessageLoopForUI::current()->Run(host_);
-}
-
void Desktop::Draw() {
// Second pass renders the layers.
compositor_->NotifyStart();
@@ -44,13 +30,4 @@ bool Desktop::OnMouseEvent(const MouseEvent& event) {
return window_->OnMouseEvent(event);
}
-// static
-Desktop* Desktop::GetInstance() {
- if (!instance_) {
- instance_ = new Desktop;
- instance_->window_->Init();
- }
- return instance_;
-}
-
} // namespace aura