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

Unified Diff: ui/aura/root_window.cc

Issue 37733003: Make GetRootWindow() return a Window instead of a RootWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: First cut for review/trybots Created 7 years, 2 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 | « ui/aura/root_window.h ('k') | ui/aura/root_window_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/root_window.cc
diff --git a/ui/aura/root_window.cc b/ui/aura/root_window.cc
index 8cecf479e11c533bca70c1412e514d4790397deb..3afd448d8ca8d1a98a16b9cb65cc3536ca422abf 100644
--- a/ui/aura/root_window.cc
+++ b/ui/aura/root_window.cc
@@ -149,6 +149,7 @@ RootWindow::RootWindow(const CreateParams& params)
event_factory_(this),
held_event_factory_(this),
repostable_event_factory_(this) {
+ set_dispatcher(this);
sky 2013/10/24 20:59:46 You need to set this to NULL in the destructor, ot
SetName("RootWindow");
compositor_.reset(new ui::Compositor(host_->GetAcceleratedWidget()));
@@ -613,7 +614,7 @@ void RootWindow::OnWindowAddedToRootWindow(Window* attached) {
}
void RootWindow::OnWindowRemovedFromRootWindow(Window* detached,
- RootWindow* new_root) {
+ Window* new_root) {
DCHECK(aura::client::GetCaptureWindow(this) != this);
DispatchMouseExitToHidingWindow(detached);
@@ -932,15 +933,15 @@ void RootWindow::DispatchMouseEventRepost(ui::MouseEvent* event) {
if (event->type() != ui::ET_MOUSE_PRESSED)
return;
Window* target = client::GetCaptureWindow(this);
- RootWindow* root = this;
+ WindowEventDispatcher* dispatcher = this;
if (!target) {
target = GetEventHandlerForPoint(event->location());
} else {
- root = target->GetRootWindow();
- CHECK(root); // Capture window better be in valid root.
+ dispatcher = target->GetDispatcher();
+ CHECK(dispatcher); // Capture window better be in valid root.
}
- root->mouse_pressed_handler_ = NULL;
- root->DispatchMouseEventToTarget(event, target);
+ dispatcher->mouse_pressed_handler_ = NULL;
+ dispatcher->DispatchMouseEventToTarget(event, target);
}
bool RootWindow::DispatchMouseEventToTarget(ui::MouseEvent* event,
« no previous file with comments | « ui/aura/root_window.h ('k') | ui/aura/root_window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698