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

Unified Diff: ui/aura/root_window.cc

Issue 9315015: Adds two new observer methods to allow code to be notified when a Window is added/removed from a ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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/window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/root_window.cc
===================================================================
--- ui/aura/root_window.cc (revision 119986)
+++ ui/aura/root_window.cc (working copy)
@@ -413,6 +413,9 @@
}
#endif
+////////////////////////////////////////////////////////////////////////////////
+// RootWindow, Window overrides:
+
RootWindow* RootWindow::GetRootWindow() {
return this;
}
@@ -427,6 +430,17 @@
}
////////////////////////////////////////////////////////////////////////////////
+// RootWindow, ui::CompositorDelegate implementation:
+
+void RootWindow::ScheduleDraw() {
+ if (!schedule_paint_factory_.HasWeakPtrs()) {
+ MessageLoop::current()->PostTask(
+ FROM_HERE,
+ base::Bind(&RootWindow::Draw, schedule_paint_factory_.GetWeakPtr()));
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////
// RootWindow, private:
RootWindow::RootWindow()
@@ -615,27 +629,7 @@
return handled;
}
-void RootWindow::ScheduleDraw() {
- if (!schedule_paint_factory_.HasWeakPtrs()) {
- MessageLoop::current()->PostTask(
- FROM_HERE,
- base::Bind(&RootWindow::Draw, schedule_paint_factory_.GetWeakPtr()));
- }
-}
-
-bool RootWindow::CanFocus() const {
- return IsVisible();
-}
-
-bool RootWindow::CanReceiveEvents() const {
- return IsVisible();
-}
-
-internal::FocusManager* RootWindow::GetFocusManager() {
- return this;
-}
-
-void RootWindow::OnWindowDetachingFromRootWindow(Window* detached) {
+void RootWindow::OnWindowRemovedFromRootWindow(Window* detached) {
DCHECK(capture_window_ != this);
// If the ancestor of the capture window is detached,
@@ -663,12 +657,24 @@
}
}
-void RootWindow::OnWindowAttachedToRootWindow(Window* attached) {
+void RootWindow::OnWindowAddedToRootWindow(Window* attached) {
if (attached->IsVisible() &&
attached->ContainsPointInRoot(last_mouse_location_))
PostMouseMoveEventAfterWindowChange();
}
+bool RootWindow::CanFocus() const {
+ return IsVisible();
+}
+
+bool RootWindow::CanReceiveEvents() const {
+ return IsVisible();
+}
+
+internal::FocusManager* RootWindow::GetFocusManager() {
+ return this;
+}
+
void RootWindow::OnLayerAnimationEnded(
const ui::LayerAnimationSequence* animation) {
OnHostResized(host_->GetSize());
@@ -765,7 +771,7 @@
orig_mouse_location,
orig_mouse_location,
0);
- DispatchMouseEvent(&event);
+ //DispatchMouseEvent(&event);
}
} // namespace aura
« no previous file with comments | « ui/aura/root_window.h ('k') | ui/aura/window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698