| 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 19 matching lines...) Expand all Loading... |
| 30 #include "ui/aura/client/aura_constants.h" | 30 #include "ui/aura/client/aura_constants.h" |
| 31 #include "ui/aura/client/screen_position_client.h" | 31 #include "ui/aura/client/screen_position_client.h" |
| 32 #include "ui/aura/client/window_types.h" | 32 #include "ui/aura/client/window_types.h" |
| 33 #include "ui/aura/root_window.h" | 33 #include "ui/aura/root_window.h" |
| 34 #include "ui/aura/window.h" | 34 #include "ui/aura/window.h" |
| 35 #include "ui/aura/window_delegate.h" | 35 #include "ui/aura/window_delegate.h" |
| 36 #include "ui/base/hit_test.h" | 36 #include "ui/base/hit_test.h" |
| 37 #include "ui/compositor/layer.h" | 37 #include "ui/compositor/layer.h" |
| 38 #include "ui/gfx/screen.h" | 38 #include "ui/gfx/screen.h" |
| 39 #include "ui/gfx/transform.h" | 39 #include "ui/gfx/transform.h" |
| 40 #include "ui/views/corewm/transient_window_manager.h" |
| 40 | 41 |
| 41 namespace ash { | 42 namespace ash { |
| 42 | 43 |
| 43 scoped_ptr<WindowResizer> CreateWindowResizer( | 44 scoped_ptr<WindowResizer> CreateWindowResizer( |
| 44 aura::Window* window, | 45 aura::Window* window, |
| 45 const gfx::Point& point_in_parent, | 46 const gfx::Point& point_in_parent, |
| 46 int window_component, | 47 int window_component, |
| 47 aura::client::WindowMoveSource source) { | 48 aura::client::WindowMoveSource source) { |
| 48 DCHECK(window); | 49 DCHECK(window); |
| 49 wm::WindowState* window_state = wm::GetWindowState(window); | 50 wm::WindowState* window_state = wm::GetWindowState(window); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 if (window_resizer) { | 91 if (window_resizer) { |
| 91 window_resizer = internal::DragWindowResizer::Create( | 92 window_resizer = internal::DragWindowResizer::Create( |
| 92 window_resizer, window, point_in_parent, window_component, source); | 93 window_resizer, window, point_in_parent, window_component, source); |
| 93 } | 94 } |
| 94 if (window_resizer && window->type() == aura::client::WINDOW_TYPE_PANEL) { | 95 if (window_resizer && window->type() == aura::client::WINDOW_TYPE_PANEL) { |
| 95 window_resizer = PanelWindowResizer::Create( | 96 window_resizer = PanelWindowResizer::Create( |
| 96 window_resizer, window, point_in_parent, window_component, source); | 97 window_resizer, window, point_in_parent, window_component, source); |
| 97 } | 98 } |
| 98 if (switches::UseDockedWindows() && | 99 if (switches::UseDockedWindows() && |
| 99 window_resizer && window->parent() && | 100 window_resizer && window->parent() && |
| 100 !window->transient_parent() && | 101 !views::corewm::GetTransientParent(window) && |
| 101 (window->parent()->id() == internal::kShellWindowId_DefaultContainer || | 102 (window->parent()->id() == internal::kShellWindowId_DefaultContainer || |
| 102 window->parent()->id() == internal::kShellWindowId_DockedContainer || | 103 window->parent()->id() == internal::kShellWindowId_DockedContainer || |
| 103 window->parent()->id() == internal::kShellWindowId_PanelContainer)) { | 104 window->parent()->id() == internal::kShellWindowId_PanelContainer)) { |
| 104 window_resizer = internal::DockedWindowResizer::Create( | 105 window_resizer = internal::DockedWindowResizer::Create( |
| 105 window_resizer, window, point_in_parent, window_component, source); | 106 window_resizer, window, point_in_parent, window_component, source); |
| 106 } | 107 } |
| 107 window_state->set_window_resizer_(window_resizer); | 108 window_state->set_window_resizer_(window_resizer); |
| 108 return make_scoped_ptr<WindowResizer>(window_resizer); | 109 return make_scoped_ptr<WindowResizer>(window_resizer); |
| 109 } | 110 } |
| 110 | 111 |
| (...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1042 } else { | 1043 } else { |
| 1043 if (dock_layout_->is_dragged_window_docked()) { | 1044 if (dock_layout_->is_dragged_window_docked()) { |
| 1044 dock_layout_->UndockDraggedWindow(); | 1045 dock_layout_->UndockDraggedWindow(); |
| 1045 window_state()->set_bounds_changed_by_user(true); | 1046 window_state()->set_bounds_changed_by_user(true); |
| 1046 } | 1047 } |
| 1047 } | 1048 } |
| 1048 } | 1049 } |
| 1049 | 1050 |
| 1050 } // namespace internal | 1051 } // namespace internal |
| 1051 } // namespace ash | 1052 } // namespace ash |
| OLD | NEW |