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

Side by Side Diff: ash/wm/workspace/workspace_window_resizer.cc

Issue 115453004: Moves management of transients out of Window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unneeded parens Created 6 years, 11 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 | Annotate | Revision Log
OLDNEW
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 18 matching lines...) Expand all
29 #include "base/memory/weak_ptr.h" 29 #include "base/memory/weak_ptr.h"
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/root_window.h" 32 #include "ui/aura/root_window.h"
33 #include "ui/aura/window.h" 33 #include "ui/aura/window.h"
34 #include "ui/aura/window_delegate.h" 34 #include "ui/aura/window_delegate.h"
35 #include "ui/base/hit_test.h" 35 #include "ui/base/hit_test.h"
36 #include "ui/compositor/layer.h" 36 #include "ui/compositor/layer.h"
37 #include "ui/gfx/screen.h" 37 #include "ui/gfx/screen.h"
38 #include "ui/gfx/transform.h" 38 #include "ui/gfx/transform.h"
39 #include "ui/views/corewm/window_util.h"
39 #include "ui/wm/public/window_types.h" 40 #include "ui/wm/public/window_types.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);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
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() == ui::wm::WINDOW_TYPE_PANEL) { 95 if (window_resizer && window->type() == ui::wm::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
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
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_layout_manager_unittest.cc ('k') | ash/wm/workspace_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698