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

Side by Side Diff: ash/wm/common/panels/panel_window_resizer.cc

Issue 1943603002: Makes ash/wm/common a library (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge again Created 4 years, 7 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
« no previous file with comments | « ash/wm/common/panels/panel_window_resizer.h ('k') | ash/wm/common/root_window_finder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/common/panels/panel_window_resizer.h" 5 #include "ash/wm/common/panels/panel_window_resizer.h"
6 6
7 #include "ash/wm/common/panels/panel_layout_manager.h" 7 #include "ash/wm/common/panels/panel_layout_manager.h"
8 #include "ash/wm/common/shelf/wm_shelf.h" 8 #include "ash/wm/common/shelf/wm_shelf.h"
9 #include "ash/wm/common/window_parenting_utils.h" 9 #include "ash/wm/common/window_parenting_utils.h"
10 #include "ash/wm/common/window_state.h" 10 #include "ash/wm/common/window_state.h"
11 #include "ash/wm/common/wm_lookup.h"
11 #include "ash/wm/common/wm_root_window_controller.h" 12 #include "ash/wm/common/wm_root_window_controller.h"
12 #include "ash/wm/common/wm_shell_window_ids.h" 13 #include "ash/wm/common/wm_shell_window_ids.h"
13 #include "ash/wm/common/wm_window.h" 14 #include "ash/wm/common/wm_window.h"
14 #include "ui/base/hit_test.h" 15 #include "ui/base/hit_test.h"
15 #include "ui/base/ui_base_types.h" 16 #include "ui/base/ui_base_types.h"
16 #include "ui/display/screen.h" 17 #include "ui/display/screen.h"
17 18
18 namespace ash { 19 namespace ash {
19 20
20 namespace { 21 namespace {
(...skipping 25 matching lines...) Expand all
46 if (dst_display.id() != 47 if (dst_display.id() !=
47 panel_container_->GetRootWindow()->GetDisplayNearestWindow().id()) { 48 panel_container_->GetRootWindow()->GetDisplayNearestWindow().id()) {
48 // The panel is being dragged to a new display. If the previous container is 49 // The panel is being dragged to a new display. If the previous container is
49 // the current parent of the panel it will be informed of the end of drag 50 // the current parent of the panel it will be informed of the end of drag
50 // when the panel is reparented, otherwise let the previous container know 51 // when the panel is reparented, otherwise let the previous container know
51 // the drag is complete. If we told the panel's parent that the drag was 52 // the drag is complete. If we told the panel's parent that the drag was
52 // complete it would begin positioning the panel. 53 // complete it would begin positioning the panel.
53 if (GetTarget()->GetParent() != panel_container_) 54 if (GetTarget()->GetParent() != panel_container_)
54 PanelLayoutManager::Get(panel_container_)->FinishDragging(); 55 PanelLayoutManager::Get(panel_container_)->FinishDragging();
55 wm::WmWindow* dst_root = 56 wm::WmWindow* dst_root =
56 wm::WmRootWindowController::GetWithDisplayId(dst_display.id()) 57 wm::WmLookup::Get()
58 ->GetRootWindowControllerWithDisplayId(dst_display.id())
57 ->GetWindow(); 59 ->GetWindow();
58 panel_container_ = 60 panel_container_ =
59 dst_root->GetChildByShellWindowId(kShellWindowId_PanelContainer); 61 dst_root->GetChildByShellWindowId(kShellWindowId_PanelContainer);
60 62
61 // The panel's parent already knows that the drag is in progress for this 63 // The panel's parent already knows that the drag is in progress for this
62 // panel. 64 // panel.
63 if (panel_container_ && GetTarget()->GetParent() != panel_container_) 65 if (panel_container_ && GetTarget()->GetParent() != panel_container_)
64 PanelLayoutManager::Get(panel_container_)->StartDragging(GetTarget()); 66 PanelLayoutManager::Get(panel_container_)->StartDragging(GetTarget());
65 } 67 }
66 gfx::Point offset; 68 gfx::Point offset;
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 195
194 void PanelWindowResizer::UpdateLauncherPosition() { 196 void PanelWindowResizer::UpdateLauncherPosition() {
195 if (panel_container_) { 197 if (panel_container_) {
196 PanelLayoutManager::Get(panel_container_) 198 PanelLayoutManager::Get(panel_container_)
197 ->shelf() 199 ->shelf()
198 ->UpdateIconPositionForWindow(GetTarget()); 200 ->UpdateIconPositionForWindow(GetTarget());
199 } 201 }
200 } 202 }
201 203
202 } // namespace ash 204 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/common/panels/panel_window_resizer.h ('k') | ash/wm/common/root_window_finder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698