| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/dock/docked_window_resizer.h" | 5 #include "ash/wm/dock/docked_window_resizer.h" |
| 6 | 6 |
| 7 #include "ash/display/display_controller.h" | 7 #include "ash/display/display_controller.h" |
| 8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
| 9 #include "ash/screen_util.h" | 9 #include "ash/screen_util.h" |
| 10 #include "ash/shelf/shelf.h" | 10 #include "ash/shelf/shelf.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include "ui/aura/env.h" | 25 #include "ui/aura/env.h" |
| 26 #include "ui/aura/window.h" | 26 #include "ui/aura/window.h" |
| 27 #include "ui/aura/window_delegate.h" | 27 #include "ui/aura/window_delegate.h" |
| 28 #include "ui/aura/window_event_dispatcher.h" | 28 #include "ui/aura/window_event_dispatcher.h" |
| 29 #include "ui/base/hit_test.h" | 29 #include "ui/base/hit_test.h" |
| 30 #include "ui/base/ui_base_types.h" | 30 #include "ui/base/ui_base_types.h" |
| 31 #include "ui/gfx/screen.h" | 31 #include "ui/gfx/screen.h" |
| 32 #include "ui/views/widget/widget.h" | 32 #include "ui/views/widget/widget.h" |
| 33 | 33 |
| 34 namespace ash { | 34 namespace ash { |
| 35 namespace internal { | |
| 36 | |
| 37 namespace { | 35 namespace { |
| 38 | 36 |
| 39 DockedWindowLayoutManager* GetDockedLayoutManagerAtPoint( | 37 DockedWindowLayoutManager* GetDockedLayoutManagerAtPoint( |
| 40 const gfx::Point& point) { | 38 const gfx::Point& point) { |
| 41 gfx::Display display = ScreenUtil::FindDisplayContainingPoint(point); | 39 gfx::Display display = ScreenUtil::FindDisplayContainingPoint(point); |
| 42 if (!display.is_valid()) | 40 if (!display.is_valid()) |
| 43 return NULL; | 41 return NULL; |
| 44 aura::Window* root = Shell::GetInstance()->display_controller()-> | 42 aura::Window* root = Shell::GetInstance()->display_controller()-> |
| 45 GetRootWindowForDisplayId(display.id()); | 43 GetRootWindowForDisplayId(display.id()); |
| 46 aura::Window* dock_container = Shell::GetContainer( | 44 aura::Window* dock_container = Shell::GetContainer( |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 // to other windows. If it is just dragged (but not resized) while being | 311 // to other windows. If it is just dragged (but not resized) while being |
| 314 // docked it is auto-sized unless it has been resized while being docked | 312 // docked it is auto-sized unless it has been resized while being docked |
| 315 // before. | 313 // before. |
| 316 if (is_docked_) { | 314 if (is_docked_) { |
| 317 wm::GetWindowState(window)->set_bounds_changed_by_user( | 315 wm::GetWindowState(window)->set_bounds_changed_by_user( |
| 318 was_docked_ && (is_resized || was_bounds_changed_by_user_)); | 316 was_docked_ && (is_resized || was_bounds_changed_by_user_)); |
| 319 } | 317 } |
| 320 return action; | 318 return action; |
| 321 } | 319 } |
| 322 | 320 |
| 323 } // namespace internal | |
| 324 } // namespace ash | 321 } // namespace ash |
| OLD | NEW |