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

Unified Diff: ash/wm/drag_details.cc

Issue 2901663003: chromeos: converts WindowState to aura::Window (Closed)
Patch Set: feedback 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/wm/drag_details.h ('k') | ash/wm/lock_layout_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/drag_details.cc
diff --git a/ash/wm/drag_details.cc b/ash/wm/drag_details.cc
index c9841979223c3df3460f57a7f5d719fc2765665c..7021d68562d52fbd5a45d2d192371aa904c877c3 100644
--- a/ash/wm/drag_details.cc
+++ b/ash/wm/drag_details.cc
@@ -6,7 +6,6 @@
#include "ash/public/cpp/window_properties.h"
#include "ash/wm/window_resizer.h"
-#include "ash/wm_window.h"
#include "ui/aura/window.h"
#include "ui/base/hit_test.h"
#include "ui/compositor/layer.h"
@@ -44,17 +43,17 @@ int GetSizeChangeDirectionForWindowComponent(int window_component) {
} // namespace
-DragDetails::DragDetails(WmWindow* window,
+DragDetails::DragDetails(aura::Window* window,
const gfx::Point& location,
int window_component,
aura::client::WindowMoveSource source)
- : initial_state_type(window->GetWindowState()->GetStateType()),
- initial_bounds_in_parent(window->GetBounds()),
+ : initial_state_type(wm::GetWindowState(window)->GetStateType()),
+ initial_bounds_in_parent(window->bounds()),
initial_location_in_parent(location),
// When drag starts, we might be in the middle of a window opacity
// animation, on drag completion we must set the opacity to the target
// opacity rather than the current opacity (crbug.com/687003).
- initial_opacity(window->GetLayer()->GetTargetOpacity()),
+ initial_opacity(window->layer()->GetTargetOpacity()),
window_component(window_component),
bounds_change(
WindowResizer::GetBoundsChangeForWindowComponent(window_component)),
@@ -65,10 +64,9 @@ DragDetails::DragDetails(WmWindow* window,
GetSizeChangeDirectionForWindowComponent(window_component)),
is_resizable(bounds_change != WindowResizer::kBoundsChangeDirection_None),
source(source),
- should_attach_to_shelf(
- window->GetType() == ui::wm::WINDOW_TYPE_PANEL &&
- window->aura_window()->GetProperty(kPanelAttachedKey)) {
- wm::WindowState* window_state = window->GetWindowState();
+ should_attach_to_shelf(window->type() == ui::wm::WINDOW_TYPE_PANEL &&
+ window->GetProperty(kPanelAttachedKey)) {
+ wm::WindowState* window_state = wm::GetWindowState(window);
if (window_state->IsNormalOrSnapped() && window_state->HasRestoreBounds() &&
window_component == HTCAPTION) {
restore_bounds = window_state->GetRestoreBoundsInScreen();
« no previous file with comments | « ash/wm/drag_details.h ('k') | ash/wm/lock_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698