Index: ui/snapshot/snapshot_aura.cc |
diff --git a/ui/snapshot/snapshot_aura.cc b/ui/snapshot/snapshot_aura.cc |
index 29daf9fc54bf69e7cc741de69b6bf798b0f5b75f..ea4cb1bc1022d3c5e99ea6402a2e461a7cfbb50f 100644 |
--- a/ui/snapshot/snapshot_aura.cc |
+++ b/ui/snapshot/snapshot_aura.cc |
@@ -40,9 +40,9 @@ bool GrabWindowSnapshot(gfx::NativeWindow window, |
// We must take into account the window's position on the desktop. |
read_pixels_bounds.Offset( |
window->GetBoundsInRootWindow().origin().OffsetFromOrigin()); |
- aura::RootWindow* root_window = window->GetRootWindow(); |
- if (root_window) |
- root_window->GetRootTransform().TransformRect(&read_pixels_bounds); |
+ aura::WindowEventDispatcher* dispatcher = window->GetDispatcher(); |
+ if (dispatcher) |
+ dispatcher->GetRootTransform().TransformRect(&read_pixels_bounds); |
gfx::Rect read_pixels_bounds_in_pixel = |
gfx::ToEnclosingRect(read_pixels_bounds); |