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/panels/panel_window_resizer.h" | 5 #include "ash/wm/panels/panel_window_resizer.h" |
6 | 6 |
7 #include "ash/display/display_controller.h" | 7 #include "ash/display/display_controller.h" |
8 #include "ash/screen_ash.h" | 8 #include "ash/screen_ash.h" |
9 #include "ash/shelf/shelf.h" | 9 #include "ash/shelf/shelf.h" |
10 #include "ash/shelf/shelf_types.h" | 10 #include "ash/shelf/shelf_types.h" |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 : details_(details), | 129 : details_(details), |
130 next_window_resizer_(next_window_resizer), | 130 next_window_resizer_(next_window_resizer), |
131 panel_container_(NULL), | 131 panel_container_(NULL), |
132 initial_panel_container_(NULL), | 132 initial_panel_container_(NULL), |
133 did_move_or_resize_(false), | 133 did_move_or_resize_(false), |
134 was_attached_(wm::GetWindowState(GetTarget())->panel_attached()), | 134 was_attached_(wm::GetWindowState(GetTarget())->panel_attached()), |
135 should_attach_(was_attached_), | 135 should_attach_(was_attached_), |
136 weak_ptr_factory_(this) { | 136 weak_ptr_factory_(this) { |
137 DCHECK(details_.is_resizable); | 137 DCHECK(details_.is_resizable); |
138 panel_container_ = Shell::GetContainer( | 138 panel_container_ = Shell::GetContainer( |
139 details.window->GetRootWindow(), | 139 GetTarget()->GetRootWindow(), |
140 internal::kShellWindowId_PanelContainer); | 140 internal::kShellWindowId_PanelContainer); |
141 initial_panel_container_ = panel_container_; | 141 initial_panel_container_ = panel_container_; |
142 } | 142 } |
143 | 143 |
144 bool PanelWindowResizer::AttachToLauncher(const gfx::Rect& bounds, | 144 bool PanelWindowResizer::AttachToLauncher(const gfx::Rect& bounds, |
145 gfx::Point* offset) { | 145 gfx::Point* offset) { |
146 bool should_attach = false; | 146 bool should_attach = false; |
147 if (panel_container_) { | 147 if (panel_container_) { |
148 internal::PanelLayoutManager* panel_layout_manager = | 148 internal::PanelLayoutManager* panel_layout_manager = |
149 GetPanelLayoutManager(panel_container_); | 149 GetPanelLayoutManager(panel_container_); |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 } | 232 } |
233 | 233 |
234 void PanelWindowResizer::UpdateLauncherPosition() { | 234 void PanelWindowResizer::UpdateLauncherPosition() { |
235 if (panel_container_) { | 235 if (panel_container_) { |
236 GetPanelLayoutManager(panel_container_)->shelf()-> | 236 GetPanelLayoutManager(panel_container_)->shelf()-> |
237 UpdateIconPositionForWindow(GetTarget()); | 237 UpdateIconPositionForWindow(GetTarget()); |
238 } | 238 } |
239 } | 239 } |
240 | 240 |
241 } // namespace aura | 241 } // namespace aura |
OLD | NEW |