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

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

Issue 11314013: Register a separate default ui::EventTarget for Aura (Ash) to ensure that it does not interfere wit… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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/client/event_client.h ('k') | ui/aura/root_window_unittest.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/root_window.h" 5 #include "ui/aura/root_window.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 // If the layer is not animating, then we need to update the host size 478 // If the layer is not animating, then we need to update the host size
479 // immediately. 479 // immediately.
480 if (!layer()->GetAnimator()->is_animating()) 480 if (!layer()->GetAnimator()->is_animating())
481 OnHostResized(host_->GetBounds().size()); 481 OnHostResized(host_->GetBounds().size());
482 } 482 }
483 483
484 //////////////////////////////////////////////////////////////////////////////// 484 ////////////////////////////////////////////////////////////////////////////////
485 // RootWindow, ui::EventTarget implementation: 485 // RootWindow, ui::EventTarget implementation:
486 486
487 ui::EventTarget* RootWindow::GetParentTarget() { 487 ui::EventTarget* RootWindow::GetParentTarget() {
488 return Env::GetInstance(); 488 return client::GetEventClient(this) ?
489 client::GetEventClient(this)->GetToplevelEventTarget() :
490 Env::GetInstance();
489 } 491 }
490 492
491 //////////////////////////////////////////////////////////////////////////////// 493 ////////////////////////////////////////////////////////////////////////////////
492 // RootWindow, ui::CompositorDelegate implementation: 494 // RootWindow, ui::CompositorDelegate implementation:
493 495
494 void RootWindow::ScheduleDraw() { 496 void RootWindow::ScheduleDraw() {
495 if (compositor_lock_) { 497 if (compositor_lock_) {
496 draw_on_compositor_unlock_ = true; 498 draw_on_compositor_unlock_ = true;
497 } else if (!defer_draw_scheduling_) { 499 } else if (!defer_draw_scheduling_) {
498 defer_draw_scheduling_ = true; 500 defer_draw_scheduling_ = true;
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
1071 void RootWindow::UnlockCompositor() { 1073 void RootWindow::UnlockCompositor() {
1072 DCHECK(compositor_lock_); 1074 DCHECK(compositor_lock_);
1073 compositor_lock_ = NULL; 1075 compositor_lock_ = NULL;
1074 if (draw_on_compositor_unlock_) { 1076 if (draw_on_compositor_unlock_) {
1075 draw_on_compositor_unlock_ = false; 1077 draw_on_compositor_unlock_ = false;
1076 ScheduleDraw(); 1078 ScheduleDraw();
1077 } 1079 }
1078 } 1080 }
1079 1081
1080 } // namespace aura 1082 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/client/event_client.h ('k') | ui/aura/root_window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698