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

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

Issue 1901773002: Removes most of aura dependencies from DefaultState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wm_window_positioner
Patch Set: nit and merge Created 4 years, 8 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/ash.gyp ('k') | ash/root_window_controller.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 0ae229f02bea6584e9485e54077bf68ab439df88..7426c57cd20ce8fc670a97258f20da19d5ef4b3e 100644
--- a/ash/frame/caption_buttons/frame_size_button.cc
+++ b/ash/frame/caption_buttons/frame_size_button.cc
@@ -7,6 +7,8 @@
#include "ash/metrics/user_metrics_recorder.h"
#include "ash/screen_util.h"
#include "ash/shell.h"
+#include "ash/wm/aura/wm_window_aura.h"
+#include "ash/wm/common/window_positioning_utils.h"
#include "ash/wm/common/wm_event.h"
#include "ash/wm/window_state.h"
#include "ash/wm/window_state_aura.h"
@@ -223,11 +225,14 @@ void FrameSizeButton::UpdateSnapType(const ui::LocatedEvent& event) {
if (!phantom_window_controller_.get()) {
phantom_window_controller_.reset(new PhantomWindowController(window));
}
- gfx::Rect phantom_bounds_in_parent = (snap_type_ == SNAP_LEFT) ?
- wm::GetDefaultLeftSnappedWindowBoundsInParent(window) :
- wm::GetDefaultRightSnappedWindowBoundsInParent(window);
+ gfx::Rect phantom_bounds_in_parent =
+ (snap_type_ == SNAP_LEFT)
+ ? wm::GetDefaultLeftSnappedWindowBoundsInParent(
+ wm::WmWindowAura::Get(window))
+ : wm::GetDefaultRightSnappedWindowBoundsInParent(
+ wm::WmWindowAura::Get(window));
phantom_window_controller_->Show(ScreenUtil::ConvertRectToScreen(
- window->parent(), phantom_bounds_in_parent));
+ window->parent(), phantom_bounds_in_parent));
} else {
phantom_window_controller_.reset();
}
« no previous file with comments | « ash/ash.gyp ('k') | ash/root_window_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698