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

Side by Side Diff: ash/wm/common/drag_details.cc

Issue 1921353002: Moves handful of files to ash/wm/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shell_ids
Patch Set: merge to trunk Created 4 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 unified diff | Download patch
« no previous file with comments | « ash/wm/common/drag_details.h ('k') | ash/wm/common/shelf/wm_shelf_observer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/wm/drag_details.h" 5 #include "ash/wm/common/drag_details.h"
6 6
7 #include "ash/wm/common/window_resizer.h"
7 #include "ash/wm/common/wm_window.h" 8 #include "ash/wm/common/wm_window.h"
8 #include "ash/wm/window_resizer.h"
9 #include "ui/aura/window.h"
10 #include "ui/base/hit_test.h" 9 #include "ui/base/hit_test.h"
10 #include "ui/compositor/layer.h"
11 11
12 namespace ash { 12 namespace ash {
13 13
14 namespace { 14 namespace {
15 15
16 int GetSizeChangeDirectionForWindowComponent(int window_component) { 16 int GetSizeChangeDirectionForWindowComponent(int window_component) {
17 int size_change_direction = WindowResizer::kBoundsChangeDirection_None; 17 int size_change_direction = WindowResizer::kBoundsChangeDirection_None;
18 switch (window_component) { 18 switch (window_component) {
19 case HTTOPLEFT: 19 case HTTOPLEFT:
20 case HTTOPRIGHT: 20 case HTTOPRIGHT:
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 WindowResizer::GetPositionChangeDirectionForWindowComponent( 57 WindowResizer::GetPositionChangeDirectionForWindowComponent(
58 window_component)), 58 window_component)),
59 size_change_direction( 59 size_change_direction(
60 GetSizeChangeDirectionForWindowComponent(window_component)), 60 GetSizeChangeDirectionForWindowComponent(window_component)),
61 is_resizable(bounds_change != WindowResizer::kBoundsChangeDirection_None), 61 is_resizable(bounds_change != WindowResizer::kBoundsChangeDirection_None),
62 source(source), 62 source(source),
63 should_attach_to_shelf(window->GetType() == ui::wm::WINDOW_TYPE_PANEL && 63 should_attach_to_shelf(window->GetType() == ui::wm::WINDOW_TYPE_PANEL &&
64 window->GetWindowState()->panel_attached()) { 64 window->GetWindowState()->panel_attached()) {
65 wm::WindowState* window_state = window->GetWindowState(); 65 wm::WindowState* window_state = window->GetWindowState();
66 if ((window_state->IsNormalOrSnapped() || window_state->IsDocked()) && 66 if ((window_state->IsNormalOrSnapped() || window_state->IsDocked()) &&
67 window_state->HasRestoreBounds() && 67 window_state->HasRestoreBounds() && window_component == HTCAPTION) {
68 window_component == HTCAPTION) {
69 restore_bounds = window_state->GetRestoreBoundsInScreen(); 68 restore_bounds = window_state->GetRestoreBoundsInScreen();
70 } 69 }
71 } 70 }
72 71
73 DragDetails::~DragDetails() { 72 DragDetails::~DragDetails() {}
74 }
75 73
76 } // namespace ash 74 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/common/drag_details.h ('k') | ash/wm/common/shelf/wm_shelf_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698