| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/workspace/workspace_window_resizer.h" | 5 #include "ash/wm/workspace/workspace_window_resizer.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 std::vector<aura::Window*>()); | 92 std::vector<aura::Window*>()); |
| 93 } else { | 93 } else { |
| 94 window_resizer = DefaultWindowResizer::Create(window_state); | 94 window_resizer = DefaultWindowResizer::Create(window_state); |
| 95 } | 95 } |
| 96 window_resizer = internal::DragWindowResizer::Create(window_resizer, | 96 window_resizer = internal::DragWindowResizer::Create(window_resizer, |
| 97 window_state); | 97 window_state); |
| 98 if (window->type() == ui::wm::WINDOW_TYPE_PANEL) | 98 if (window->type() == ui::wm::WINDOW_TYPE_PANEL) |
| 99 window_resizer = PanelWindowResizer::Create(window_resizer, window_state); | 99 window_resizer = PanelWindowResizer::Create(window_resizer, window_state); |
| 100 if (switches::UseDockedWindows() && | 100 if (switches::UseDockedWindows() && |
| 101 window_resizer && window->parent() && | 101 window_resizer && window->parent() && |
| 102 !views::corewm::GetTransientParent(window) && | 102 !::wm::GetTransientParent(window) && |
| 103 (window->parent()->id() == internal::kShellWindowId_DefaultContainer || | 103 (window->parent()->id() == internal::kShellWindowId_DefaultContainer || |
| 104 window->parent()->id() == internal::kShellWindowId_DockedContainer || | 104 window->parent()->id() == internal::kShellWindowId_DockedContainer || |
| 105 window->parent()->id() == internal::kShellWindowId_PanelContainer)) { | 105 window->parent()->id() == internal::kShellWindowId_PanelContainer)) { |
| 106 window_resizer = internal::DockedWindowResizer::Create(window_resizer, | 106 window_resizer = internal::DockedWindowResizer::Create(window_resizer, |
| 107 window_state); | 107 window_state); |
| 108 } | 108 } |
| 109 return make_scoped_ptr<WindowResizer>(window_resizer); | 109 return make_scoped_ptr<WindowResizer>(window_resizer); |
| 110 } | 110 } |
| 111 | 111 |
| 112 namespace internal { | 112 namespace internal { |
| (...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1042 gfx::Rect snapped_bounds = ScreenUtil::GetDisplayWorkAreaBoundsInParent( | 1042 gfx::Rect snapped_bounds = ScreenUtil::GetDisplayWorkAreaBoundsInParent( |
| 1043 GetTarget()); | 1043 GetTarget()); |
| 1044 if (snapped_type == wm::WINDOW_STATE_TYPE_RIGHT_SNAPPED) | 1044 if (snapped_type == wm::WINDOW_STATE_TYPE_RIGHT_SNAPPED) |
| 1045 snapped_bounds.set_x(snapped_bounds.right() - bounds_in_parent.width()); | 1045 snapped_bounds.set_x(snapped_bounds.right() - bounds_in_parent.width()); |
| 1046 snapped_bounds.set_width(bounds_in_parent.width()); | 1046 snapped_bounds.set_width(bounds_in_parent.width()); |
| 1047 return bounds_in_parent == snapped_bounds; | 1047 return bounds_in_parent == snapped_bounds; |
| 1048 } | 1048 } |
| 1049 | 1049 |
| 1050 } // namespace internal | 1050 } // namespace internal |
| 1051 } // namespace ash | 1051 } // namespace ash |
| OLD | NEW |