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

Unified Diff: aura/desktop.cc

Issue 7791030: Proper MouseEvent targeting. Adds a Window method that locates a Window for a given point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « aura/desktop.h ('k') | aura/desktop_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: aura/desktop.cc
===================================================================
--- aura/desktop.cc (revision 98852)
+++ aura/desktop.cc (working copy)
@@ -5,6 +5,7 @@
#include "aura/desktop.h"
#include "aura/desktop_host.h"
+#include "aura/root_window.h"
#include "aura/window.h"
#include "base/logging.h"
#include "base/message_loop.h"
@@ -21,27 +22,34 @@
host_->GetSize());
host_->SetDesktop(this);
DCHECK(compositor_.get());
- window_.reset(new Window(NULL));
+ window_.reset(new internal::RootWindow);
}
Desktop::~Desktop() {
}
+void Desktop::Show() {
+ host_->Show();
+}
+
+void Desktop::SetSize(const gfx::Size& size) {
+ host_->SetSize(size);
+}
+
void Desktop::Run() {
- host_->Show();
+ Show();
MessageLoop main_message_loop(MessageLoop::TYPE_UI);
MessageLoopForUI::current()->Run(host_);
}
void Desktop::Draw() {
- // Second pass renders the layers.
compositor_->NotifyStart();
window_->DrawTree();
compositor_->NotifyEnd();
}
bool Desktop::OnMouseEvent(const MouseEvent& event) {
- return window_->OnMouseEvent(event);
+ return window_->HandleMouseEvent(event);
}
// static
« no previous file with comments | « aura/desktop.h ('k') | aura/desktop_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698