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

Unified Diff: ash/common/wm/drag_details.cc

Issue 2736573002: chromeos: Move files in //ash/common to //ash, part 2 (Closed)
Patch Set: Created 3 years, 9 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/common/wm/drag_details.h ('k') | ash/common/wm/focus_rules.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm/drag_details.cc
diff --git a/ash/common/wm/drag_details.cc b/ash/common/wm/drag_details.cc
deleted file mode 100644
index 4a9182674e6d0b2b667258a658c350306ac21716..0000000000000000000000000000000000000000
--- a/ash/common/wm/drag_details.cc
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ash/common/wm/drag_details.h"
-
-#include "ash/common/wm/window_resizer.h"
-#include "ash/common/wm_window.h"
-#include "ash/public/cpp/window_properties.h"
-#include "ui/aura/window.h"
-#include "ui/base/hit_test.h"
-#include "ui/compositor/layer.h"
-
-namespace ash {
-
-namespace {
-
-int GetSizeChangeDirectionForWindowComponent(int window_component) {
- int size_change_direction = WindowResizer::kBoundsChangeDirection_None;
- switch (window_component) {
- case HTTOPLEFT:
- case HTTOPRIGHT:
- case HTBOTTOMLEFT:
- case HTBOTTOMRIGHT:
- case HTGROWBOX:
- case HTCAPTION:
- size_change_direction |=
- WindowResizer::kBoundsChangeDirection_Horizontal |
- WindowResizer::kBoundsChangeDirection_Vertical;
- break;
- case HTTOP:
- case HTBOTTOM:
- size_change_direction |= WindowResizer::kBoundsChangeDirection_Vertical;
- break;
- case HTRIGHT:
- case HTLEFT:
- size_change_direction |= WindowResizer::kBoundsChangeDirection_Horizontal;
- break;
- default:
- break;
- }
- return size_change_direction;
-}
-
-} // namespace
-
-DragDetails::DragDetails(WmWindow* 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_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()),
- window_component(window_component),
- bounds_change(
- WindowResizer::GetBoundsChangeForWindowComponent(window_component)),
- position_change_direction(
- WindowResizer::GetPositionChangeDirectionForWindowComponent(
- window_component)),
- size_change_direction(
- 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();
- if ((window_state->IsNormalOrSnapped() || window_state->IsDocked()) &&
- window_state->HasRestoreBounds() && window_component == HTCAPTION) {
- restore_bounds = window_state->GetRestoreBoundsInScreen();
- }
-}
-
-DragDetails::~DragDetails() {}
-
-} // namespace ash
« no previous file with comments | « ash/common/wm/drag_details.h ('k') | ash/common/wm/focus_rules.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698