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

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

Issue 2558963002: Move shelf item tooltip flag from delegate to item. (Closed)
Patch Set: Remove WmWindowMus::SetBoolProperty override. Created 4 years 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/common/wm/drag_details.cc ('k') | ash/common/wm/panels/panel_window_resizer.cc » ('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/common/wm/panels/panel_layout_manager.h" 5 #include "ash/common/wm/panels/panel_layout_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 void PanelLayoutManager::OnWindowResized() { 333 void PanelLayoutManager::OnWindowResized() {
334 Relayout(); 334 Relayout();
335 } 335 }
336 336
337 void PanelLayoutManager::OnWindowAddedToLayout(WmWindow* child) { 337 void PanelLayoutManager::OnWindowAddedToLayout(WmWindow* child) {
338 if (child->GetType() == ui::wm::WINDOW_TYPE_POPUP) 338 if (child->GetType() == ui::wm::WINDOW_TYPE_POPUP)
339 return; 339 return;
340 if (in_add_window_) 340 if (in_add_window_)
341 return; 341 return;
342 base::AutoReset<bool> auto_reset_in_add_window(&in_add_window_, true); 342 base::AutoReset<bool> auto_reset_in_add_window(&in_add_window_, true);
343 if (!child->GetWindowState()->panel_attached()) { 343 if (!child->GetBoolProperty(WmWindowProperty::PANEL_ATTACHED)) {
344 // This should only happen when a window is added to panel container as a 344 // This should only happen when a window is added to panel container as a
345 // result of bounds change from within the application during a drag. 345 // result of bounds change from within the application during a drag.
346 // If so we have already stopped the drag and should reparent the panel 346 // If so we have already stopped the drag and should reparent the panel
347 // back to appropriate container and ignore it. 347 // back to appropriate container and ignore it.
348 // TODO(varkha): Updating bounds during a drag can cause problems and a more 348 // TODO(varkha): Updating bounds during a drag can cause problems and a more
349 // general solution is needed. See http://crbug.com/251813 . 349 // general solution is needed. See http://crbug.com/251813 .
350 WmWindow* old_parent = child->GetParent(); 350 WmWindow* old_parent = child->GetParent();
351 child->SetParentUsingContext(child, 351 child->SetParentUsingContext(child,
352 child->GetRootWindow()->GetBoundsInScreen()); 352 child->GetRootWindow()->GetBoundsInScreen());
353 wm::ReparentTransientChildrenOfChild(child, old_parent, child->GetParent()); 353 wm::ReparentTransientChildrenOfChild(child, old_parent, child->GetParent());
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 } 902 }
903 } 903 }
904 // This bounds change will have caused a change to the Shelf which does not 904 // This bounds change will have caused a change to the Shelf which does not
905 // propogate automatically to this class, so manually recalculate bounds. 905 // propogate automatically to this class, so manually recalculate bounds.
906 OnWindowResized(); 906 OnWindowResized();
907 } 907 }
908 908
909 void PanelLayoutManager::OnKeyboardClosed() {} 909 void PanelLayoutManager::OnKeyboardClosed() {}
910 910
911 } // namespace ash 911 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm/drag_details.cc ('k') | ash/common/wm/panels/panel_window_resizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698