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

Unified Diff: ash/frame/caption_buttons/frame_size_button.cc

Issue 2897993003: chromeos: converts WindowResizer to aura::Window (Closed)
Patch Set: remove include from exo Created 3 years, 7 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 | « ash/accelerators/accelerator_controller_unittest.cc ('k') | ash/shelf/shelf_window_watcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « ash/accelerators/accelerator_controller_unittest.cc ('k') | ash/shelf/shelf_window_watcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698