Index: ash/frame/caption_buttons/frame_size_button.cc |
diff --git a/ash/frame/caption_buttons/frame_size_button.cc b/ash/frame/caption_buttons/frame_size_button.cc |
index db381c03d8dbffef91479113bd90886444fd9934..59ce4291072b8224b20148fefa53f1002ec92401 100644 |
--- a/ash/frame/caption_buttons/frame_size_button.cc |
+++ b/ash/frame/caption_buttons/frame_size_button.cc |
@@ -11,8 +11,10 @@ |
#include "ash/wm/workspace/phantom_window_controller.h" |
#include "ash/wm_window.h" |
#include "base/i18n/rtl.h" |
+#include "ui/aura/window.h" |
#include "ui/gfx/geometry/vector2d.h" |
#include "ui/views/widget/widget.h" |
+#include "ui/wm/core/coordinate_conversion.h" |
namespace ash { |
@@ -210,15 +212,17 @@ void FrameSizeButton::UpdateSnapType(const ui::LocatedEvent& event) { |
} |
if (snap_type_ == SNAP_LEFT || snap_type_ == SNAP_RIGHT) { |
- WmWindow* window = WmWindow::Get(frame_->GetNativeWindow()); |
- if (!phantom_window_controller_.get()) |
- phantom_window_controller_.reset(new PhantomWindowController(window)); |
- gfx::Rect phantom_bounds_in_parent = |
+ aura::Window* window = frame_->GetNativeWindow(); |
+ if (!phantom_window_controller_.get()) { |
+ phantom_window_controller_.reset( |
+ new PhantomWindowController(WmWindow::Get(window))); |
+ } |
+ gfx::Rect phantom_bounds_in_screen = |
(snap_type_ == SNAP_LEFT) |
? wm::GetDefaultLeftSnappedWindowBoundsInParent(window) |
: wm::GetDefaultRightSnappedWindowBoundsInParent(window); |
- phantom_window_controller_->Show( |
- window->GetParent()->ConvertRectToScreen(phantom_bounds_in_parent)); |
+ ::wm::ConvertRectToScreen(window->parent(), &phantom_bounds_in_screen); |
+ phantom_window_controller_->Show(phantom_bounds_in_screen); |
} else { |
phantom_window_controller_.reset(); |
} |