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/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 |
| 11 #include "ash/common/shelf/wm_shelf.h" |
| 12 #include "ash/common/shelf/wm_shelf_util.h" |
11 #include "ash/common/shell_window_ids.h" | 13 #include "ash/common/shell_window_ids.h" |
12 #include "ash/common/wm/shelf/wm_shelf.h" | |
13 #include "ash/common/wm/shelf/wm_shelf_util.h" | |
14 #include "ash/common/wm/window_animation_types.h" | 14 #include "ash/common/wm/window_animation_types.h" |
15 #include "ash/common/wm/window_parenting_utils.h" | 15 #include "ash/common/wm/window_parenting_utils.h" |
16 #include "ash/common/wm/window_state.h" | 16 #include "ash/common/wm/window_state.h" |
17 #include "ash/common/wm/wm_globals.h" | 17 #include "ash/common/wm/wm_globals.h" |
18 #include "ash/common/wm/wm_lookup.h" | 18 #include "ash/common/wm/wm_lookup.h" |
19 #include "ash/common/wm/wm_root_window_controller.h" | 19 #include "ash/common/wm/wm_root_window_controller.h" |
20 #include "ash/common/wm/wm_window.h" | 20 #include "ash/common/wm/wm_window.h" |
21 #include "ash/common/wm/wm_window_property.h" | 21 #include "ash/common/wm/wm_window_property.h" |
22 #include "base/auto_reset.h" | 22 #include "base/auto_reset.h" |
23 #include "third_party/skia/include/core/SkColor.h" | 23 #include "third_party/skia/include/core/SkColor.h" |
(...skipping 21 matching lines...) Expand all Loading... |
45 // Offset used when sliding panel in/out of the shelf. Used for minimizing, | 45 // Offset used when sliding panel in/out of the shelf. Used for minimizing, |
46 // restoring and the initial showing of a panel. | 46 // restoring and the initial showing of a panel. |
47 const int kPanelSlideInOffset = 20; | 47 const int kPanelSlideInOffset = 20; |
48 | 48 |
49 // Callout arrow dimensions. | 49 // Callout arrow dimensions. |
50 const int kArrowWidth = 18; | 50 const int kArrowWidth = 18; |
51 const int kArrowHeight = 9; | 51 const int kArrowHeight = 9; |
52 | 52 |
53 class CalloutWidgetBackground : public views::Background { | 53 class CalloutWidgetBackground : public views::Background { |
54 public: | 54 public: |
55 CalloutWidgetBackground() : alignment_(wm::SHELF_ALIGNMENT_BOTTOM) {} | 55 CalloutWidgetBackground() : alignment_(SHELF_ALIGNMENT_BOTTOM) {} |
56 | 56 |
57 void Paint(gfx::Canvas* canvas, views::View* view) const override { | 57 void Paint(gfx::Canvas* canvas, views::View* view) const override { |
58 SkPath path; | 58 SkPath path; |
59 switch (alignment_) { | 59 switch (alignment_) { |
60 case wm::SHELF_ALIGNMENT_BOTTOM: | 60 case SHELF_ALIGNMENT_BOTTOM: |
61 case wm::SHELF_ALIGNMENT_BOTTOM_LOCKED: | 61 case SHELF_ALIGNMENT_BOTTOM_LOCKED: |
62 path.moveTo(SkIntToScalar(0), SkIntToScalar(0)); | 62 path.moveTo(SkIntToScalar(0), SkIntToScalar(0)); |
63 path.lineTo(SkIntToScalar(kArrowWidth / 2), | 63 path.lineTo(SkIntToScalar(kArrowWidth / 2), |
64 SkIntToScalar(kArrowHeight)); | 64 SkIntToScalar(kArrowHeight)); |
65 path.lineTo(SkIntToScalar(kArrowWidth), SkIntToScalar(0)); | 65 path.lineTo(SkIntToScalar(kArrowWidth), SkIntToScalar(0)); |
66 break; | 66 break; |
67 case wm::SHELF_ALIGNMENT_LEFT: | 67 case SHELF_ALIGNMENT_LEFT: |
68 path.moveTo(SkIntToScalar(kArrowHeight), SkIntToScalar(kArrowWidth)); | 68 path.moveTo(SkIntToScalar(kArrowHeight), SkIntToScalar(kArrowWidth)); |
69 path.lineTo(SkIntToScalar(0), SkIntToScalar(kArrowWidth / 2)); | 69 path.lineTo(SkIntToScalar(0), SkIntToScalar(kArrowWidth / 2)); |
70 path.lineTo(SkIntToScalar(kArrowHeight), SkIntToScalar(0)); | 70 path.lineTo(SkIntToScalar(kArrowHeight), SkIntToScalar(0)); |
71 break; | 71 break; |
72 case wm::SHELF_ALIGNMENT_RIGHT: | 72 case SHELF_ALIGNMENT_RIGHT: |
73 path.moveTo(SkIntToScalar(0), SkIntToScalar(0)); | 73 path.moveTo(SkIntToScalar(0), SkIntToScalar(0)); |
74 path.lineTo(SkIntToScalar(kArrowHeight), | 74 path.lineTo(SkIntToScalar(kArrowHeight), |
75 SkIntToScalar(kArrowWidth / 2)); | 75 SkIntToScalar(kArrowWidth / 2)); |
76 path.lineTo(SkIntToScalar(0), SkIntToScalar(kArrowWidth)); | 76 path.lineTo(SkIntToScalar(0), SkIntToScalar(kArrowWidth)); |
77 break; | 77 break; |
78 } | 78 } |
79 // Hard code the arrow color for now. | 79 // Hard code the arrow color for now. |
80 SkPaint paint; | 80 SkPaint paint; |
81 paint.setStyle(SkPaint::kFill_Style); | 81 paint.setStyle(SkPaint::kFill_Style); |
82 paint.setColor(SkColorSetARGB(0xff, 0xe5, 0xe5, 0xe5)); | 82 paint.setColor(SkColorSetARGB(0xff, 0xe5, 0xe5, 0xe5)); |
83 canvas->DrawPath(path, paint); | 83 canvas->DrawPath(path, paint); |
84 } | 84 } |
85 | 85 |
86 wm::ShelfAlignment alignment() { return alignment_; } | 86 ShelfAlignment alignment() { return alignment_; } |
87 | 87 |
88 void set_alignment(wm::ShelfAlignment alignment) { alignment_ = alignment; } | 88 void set_alignment(ShelfAlignment alignment) { alignment_ = alignment; } |
89 | 89 |
90 private: | 90 private: |
91 wm::ShelfAlignment alignment_; | 91 ShelfAlignment alignment_; |
92 | 92 |
93 DISALLOW_COPY_AND_ASSIGN(CalloutWidgetBackground); | 93 DISALLOW_COPY_AND_ASSIGN(CalloutWidgetBackground); |
94 }; | 94 }; |
95 | 95 |
96 struct VisiblePanelPositionInfo { | 96 struct VisiblePanelPositionInfo { |
97 VisiblePanelPositionInfo() | 97 VisiblePanelPositionInfo() |
98 : min_major(0), | 98 : min_major(0), |
99 max_major(0), | 99 max_major(0), |
100 major_pos(0), | 100 major_pos(0), |
101 major_length(0), | 101 major_length(0), |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 std::max((*iter).min_major, std::min((*iter).max_major, major_pos)); | 153 std::max((*iter).min_major, std::min((*iter).max_major, major_pos)); |
154 major_pos += delta; | 154 major_pos += delta; |
155 } | 155 } |
156 } | 156 } |
157 | 157 |
158 bool BoundsAdjacent(const gfx::Rect& bounds1, const gfx::Rect& bounds2) { | 158 bool BoundsAdjacent(const gfx::Rect& bounds1, const gfx::Rect& bounds2) { |
159 return bounds1.x() == bounds2.right() || bounds1.y() == bounds2.bottom() || | 159 return bounds1.x() == bounds2.right() || bounds1.y() == bounds2.bottom() || |
160 bounds1.right() == bounds2.x() || bounds1.bottom() == bounds2.y(); | 160 bounds1.right() == bounds2.x() || bounds1.bottom() == bounds2.y(); |
161 } | 161 } |
162 | 162 |
163 gfx::Vector2d GetSlideInAnimationOffset(wm::ShelfAlignment alignment) { | 163 gfx::Vector2d GetSlideInAnimationOffset(ShelfAlignment alignment) { |
164 gfx::Vector2d offset; | 164 gfx::Vector2d offset; |
165 if (alignment == wm::SHELF_ALIGNMENT_LEFT) | 165 if (alignment == SHELF_ALIGNMENT_LEFT) |
166 offset.set_x(-kPanelSlideInOffset); | 166 offset.set_x(-kPanelSlideInOffset); |
167 else if (alignment == wm::SHELF_ALIGNMENT_RIGHT) | 167 else if (alignment == SHELF_ALIGNMENT_RIGHT) |
168 offset.set_x(kPanelSlideInOffset); | 168 offset.set_x(kPanelSlideInOffset); |
169 else | 169 else |
170 offset.set_y(kPanelSlideInOffset); | 170 offset.set_y(kPanelSlideInOffset); |
171 return offset; | 171 return offset; |
172 } | 172 } |
173 | 173 |
174 } // namespace | 174 } // namespace |
175 | 175 |
176 class PanelCalloutWidget : public views::Widget { | 176 class PanelCalloutWidget : public views::Widget { |
177 public: | 177 public: |
178 explicit PanelCalloutWidget(wm::WmWindow* container) : background_(nullptr) { | 178 explicit PanelCalloutWidget(wm::WmWindow* container) : background_(nullptr) { |
179 InitWidget(container); | 179 InitWidget(container); |
180 } | 180 } |
181 | 181 |
182 void SetAlignment(wm::ShelfAlignment alignment) { | 182 void SetAlignment(ShelfAlignment alignment) { |
183 gfx::Rect callout_bounds = GetWindowBoundsInScreen(); | 183 gfx::Rect callout_bounds = GetWindowBoundsInScreen(); |
184 if (wm::IsHorizontalAlignment(alignment)) { | 184 if (IsHorizontalAlignment(alignment)) { |
185 callout_bounds.set_width(kArrowWidth); | 185 callout_bounds.set_width(kArrowWidth); |
186 callout_bounds.set_height(kArrowHeight); | 186 callout_bounds.set_height(kArrowHeight); |
187 } else { | 187 } else { |
188 callout_bounds.set_width(kArrowHeight); | 188 callout_bounds.set_width(kArrowHeight); |
189 callout_bounds.set_height(kArrowWidth); | 189 callout_bounds.set_height(kArrowWidth); |
190 } | 190 } |
191 SetBounds(callout_bounds); | 191 SetBounds(callout_bounds); |
192 if (background_->alignment() != alignment) { | 192 if (background_->alignment() != alignment) { |
193 background_->set_alignment(alignment); | 193 background_->set_alignment(alignment); |
194 SchedulePaintInRect(gfx::Rect(callout_bounds.size())); | 194 SchedulePaintInRect(gfx::Rect(callout_bounds.size())); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 DCHECK(!dragged_panel_); | 285 DCHECK(!dragged_panel_); |
286 dragged_panel_ = panel; | 286 dragged_panel_ = panel; |
287 Relayout(); | 287 Relayout(); |
288 } | 288 } |
289 | 289 |
290 void PanelLayoutManager::FinishDragging() { | 290 void PanelLayoutManager::FinishDragging() { |
291 dragged_panel_ = NULL; | 291 dragged_panel_ = NULL; |
292 Relayout(); | 292 Relayout(); |
293 } | 293 } |
294 | 294 |
295 void PanelLayoutManager::SetShelf(wm::WmShelf* shelf) { | 295 void PanelLayoutManager::SetShelf(WmShelf* shelf) { |
296 DCHECK(!shelf_); | 296 DCHECK(!shelf_); |
297 shelf_ = shelf; | 297 shelf_ = shelf; |
298 shelf_->AddObserver(this); | 298 shelf_->AddObserver(this); |
299 WillChangeVisibilityState(shelf_->GetVisibilityState()); | 299 WillChangeVisibilityState(shelf_->GetVisibilityState()); |
300 } | 300 } |
301 | 301 |
302 void PanelLayoutManager::ToggleMinimize(wm::WmWindow* panel) { | 302 void PanelLayoutManager::ToggleMinimize(wm::WmWindow* panel) { |
303 DCHECK(panel->GetParent() == panel_container_); | 303 DCHECK(panel->GetParent() == panel_container_); |
304 wm::WindowState* window_state = panel->GetWindowState(); | 304 wm::WindowState* window_state = panel->GetWindowState(); |
305 if (window_state->IsMinimized()) | 305 if (window_state->IsMinimized()) |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 // when the WindowSelectorController is restoring minimized windows so that | 583 // when the WindowSelectorController is restoring minimized windows so that |
584 // they actually become visible. | 584 // they actually become visible. |
585 wm::WmGlobals* globals = panel_container_->GetGlobals(); | 585 wm::WmGlobals* globals = panel_container_->GetGlobals(); |
586 if (in_layout_ || (globals->IsOverviewModeSelecting() && | 586 if (in_layout_ || (globals->IsOverviewModeSelecting() && |
587 !globals->IsOverviewModeRestoringMinimizedWindows())) { | 587 !globals->IsOverviewModeRestoringMinimizedWindows())) { |
588 return; | 588 return; |
589 } | 589 } |
590 | 590 |
591 base::AutoReset<bool> auto_reset_in_layout(&in_layout_, true); | 591 base::AutoReset<bool> auto_reset_in_layout(&in_layout_, true); |
592 | 592 |
593 const wm::ShelfAlignment alignment = shelf_->GetAlignment(); | 593 const ShelfAlignment alignment = shelf_->GetAlignment(); |
594 const bool horizontal = wm::IsHorizontalAlignment(shelf_->GetAlignment()); | 594 const bool horizontal = IsHorizontalAlignment(shelf_->GetAlignment()); |
595 gfx::Rect shelf_bounds = panel_container_->ConvertRectFromScreen( | 595 gfx::Rect shelf_bounds = panel_container_->ConvertRectFromScreen( |
596 shelf_->GetWindow()->GetBoundsInScreen()); | 596 shelf_->GetWindow()->GetBoundsInScreen()); |
597 int panel_start_bounds = kPanelIdealSpacing; | 597 int panel_start_bounds = kPanelIdealSpacing; |
598 int panel_end_bounds = | 598 int panel_end_bounds = |
599 horizontal ? panel_container_->GetBounds().width() - kPanelIdealSpacing | 599 horizontal ? panel_container_->GetBounds().width() - kPanelIdealSpacing |
600 : panel_container_->GetBounds().height() - kPanelIdealSpacing; | 600 : panel_container_->GetBounds().height() - kPanelIdealSpacing; |
601 wm::WmWindow* active_panel = nullptr; | 601 wm::WmWindow* active_panel = nullptr; |
602 std::vector<VisiblePanelPositionInfo> visible_panels; | 602 std::vector<VisiblePanelPositionInfo> visible_panels; |
603 for (PanelList::iterator iter = panel_windows_.begin(); | 603 for (PanelList::iterator iter = panel_windows_.begin(); |
604 iter != panel_windows_.end(); ++iter) { | 604 iter != panel_windows_.end(); ++iter) { |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
675 } | 675 } |
676 } | 676 } |
677 FanOutPanels(visible_panels.begin() + first_overlapping_panel, | 677 FanOutPanels(visible_panels.begin() + first_overlapping_panel, |
678 visible_panels.end()); | 678 visible_panels.end()); |
679 | 679 |
680 for (size_t i = 0; i < visible_panels.size(); ++i) { | 680 for (size_t i = 0; i < visible_panels.size(); ++i) { |
681 if (visible_panels[i].window == dragged_panel_) | 681 if (visible_panels[i].window == dragged_panel_) |
682 continue; | 682 continue; |
683 bool slide_in = visible_panels[i].slide_in; | 683 bool slide_in = visible_panels[i].slide_in; |
684 gfx::Rect bounds = visible_panels[i].window->GetTargetBounds(); | 684 gfx::Rect bounds = visible_panels[i].window->GetTargetBounds(); |
685 if (alignment == wm::SHELF_ALIGNMENT_LEFT) | 685 if (alignment == SHELF_ALIGNMENT_LEFT) |
686 bounds.set_x(shelf_bounds.right()); | 686 bounds.set_x(shelf_bounds.right()); |
687 else if (alignment == wm::SHELF_ALIGNMENT_RIGHT) | 687 else if (alignment == SHELF_ALIGNMENT_RIGHT) |
688 bounds.set_x(shelf_bounds.x() - bounds.width()); | 688 bounds.set_x(shelf_bounds.x() - bounds.width()); |
689 else | 689 else |
690 bounds.set_y(shelf_bounds.y() - bounds.height()); | 690 bounds.set_y(shelf_bounds.y() - bounds.height()); |
691 bool on_shelf = visible_panels[i].window->GetTargetBounds() == bounds; | 691 bool on_shelf = visible_panels[i].window->GetTargetBounds() == bounds; |
692 | 692 |
693 if (horizontal) { | 693 if (horizontal) { |
694 bounds.set_x(visible_panels[i].major_pos - | 694 bounds.set_x(visible_panels[i].major_pos - |
695 visible_panels[i].major_length / 2); | 695 visible_panels[i].major_length / 2); |
696 } else { | 696 } else { |
697 bounds.set_y(visible_panels[i].major_pos - | 697 bounds.set_y(visible_panels[i].major_pos - |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
742 // We want to to stack the panels like a deck of cards: | 742 // We want to to stack the panels like a deck of cards: |
743 // ,--,--,--,-------.--.--. | 743 // ,--,--,--,-------.--.--. |
744 // | | | | | | | | 744 // | | | | | | | |
745 // | | | | | | | | 745 // | | | | | | | |
746 // | 746 // |
747 // We use the middle of each panel to figure out how to stack the panels. This | 747 // We use the middle of each panel to figure out how to stack the panels. This |
748 // allows us to update the stacking when a panel is being dragged around by | 748 // allows us to update the stacking when a panel is being dragged around by |
749 // the titlebar--even though it doesn't update the shelf icon positions, we | 749 // the titlebar--even though it doesn't update the shelf icon positions, we |
750 // still want the visual effect. | 750 // still want the visual effect. |
751 std::map<int, wm::WmWindow*> window_ordering; | 751 std::map<int, wm::WmWindow*> window_ordering; |
752 const bool horizontal = wm::IsHorizontalAlignment(shelf_->GetAlignment()); | 752 const bool horizontal = IsHorizontalAlignment(shelf_->GetAlignment()); |
753 for (PanelList::const_iterator it = panel_windows_.begin(); | 753 for (PanelList::const_iterator it = panel_windows_.begin(); |
754 it != panel_windows_.end(); ++it) { | 754 it != panel_windows_.end(); ++it) { |
755 gfx::Rect bounds = it->window->GetBounds(); | 755 gfx::Rect bounds = it->window->GetBounds(); |
756 window_ordering.insert( | 756 window_ordering.insert( |
757 std::make_pair(horizontal ? bounds.x() + bounds.width() / 2 | 757 std::make_pair(horizontal ? bounds.x() + bounds.width() / 2 |
758 : bounds.y() + bounds.height() / 2, | 758 : bounds.y() + bounds.height() / 2, |
759 it->window)); | 759 it->window)); |
760 } | 760 } |
761 | 761 |
762 wm::WmWindow* previous_panel = nullptr; | 762 wm::WmWindow* previous_panel = nullptr; |
(...skipping 14 matching lines...) Expand all Loading... |
777 previous_panel = it->second; | 777 previous_panel = it->second; |
778 } | 778 } |
779 | 779 |
780 panel_container_->StackChildAtTop(active_panel); | 780 panel_container_->StackChildAtTop(active_panel); |
781 if (dragged_panel_ && dragged_panel_->GetParent() == panel_container_) | 781 if (dragged_panel_ && dragged_panel_->GetParent() == panel_container_) |
782 panel_container_->StackChildAtTop(dragged_panel_); | 782 panel_container_->StackChildAtTop(dragged_panel_); |
783 last_active_panel_ = active_panel; | 783 last_active_panel_ = active_panel; |
784 } | 784 } |
785 | 785 |
786 void PanelLayoutManager::UpdateCallouts() { | 786 void PanelLayoutManager::UpdateCallouts() { |
787 const bool horizontal = wm::IsHorizontalAlignment(shelf_->GetAlignment()); | 787 const bool horizontal = IsHorizontalAlignment(shelf_->GetAlignment()); |
788 for (PanelList::iterator iter = panel_windows_.begin(); | 788 for (PanelList::iterator iter = panel_windows_.begin(); |
789 iter != panel_windows_.end(); ++iter) { | 789 iter != panel_windows_.end(); ++iter) { |
790 wm::WmWindow* panel = iter->window; | 790 wm::WmWindow* panel = iter->window; |
791 views::Widget* callout_widget = iter->callout_widget; | 791 views::Widget* callout_widget = iter->callout_widget; |
792 wm::WmWindow* callout_widget_window = | 792 wm::WmWindow* callout_widget_window = |
793 wm::WmLookup::Get()->GetWindowForWidget(callout_widget); | 793 wm::WmLookup::Get()->GetWindowForWidget(callout_widget); |
794 | 794 |
795 gfx::Rect current_bounds = panel->GetBoundsInScreen(); | 795 gfx::Rect current_bounds = panel->GetBoundsInScreen(); |
796 gfx::Rect bounds = | 796 gfx::Rect bounds = |
797 panel->GetParent()->ConvertRectToScreen(panel->GetTargetBounds()); | 797 panel->GetParent()->ConvertRectToScreen(panel->GetTargetBounds()); |
(...skipping 16 matching lines...) Expand all Loading... |
814 std::max(current_bounds.x() - callout_bounds.x(), | 814 std::max(current_bounds.x() - callout_bounds.x(), |
815 callout_bounds.right() - current_bounds.right()); | 815 callout_bounds.right() - current_bounds.right()); |
816 } else { | 816 } else { |
817 callout_bounds.set_y(icon_bounds.y() + | 817 callout_bounds.set_y(icon_bounds.y() + |
818 (icon_bounds.height() - callout_bounds.height()) / | 818 (icon_bounds.height() - callout_bounds.height()) / |
819 2); | 819 2); |
820 distance_until_over_panel = | 820 distance_until_over_panel = |
821 std::max(current_bounds.y() - callout_bounds.y(), | 821 std::max(current_bounds.y() - callout_bounds.y(), |
822 callout_bounds.bottom() - current_bounds.bottom()); | 822 callout_bounds.bottom() - current_bounds.bottom()); |
823 } | 823 } |
824 if (shelf_->GetAlignment() == wm::SHELF_ALIGNMENT_LEFT) | 824 if (shelf_->GetAlignment() == SHELF_ALIGNMENT_LEFT) |
825 callout_bounds.set_x(bounds.x() - callout_bounds.width()); | 825 callout_bounds.set_x(bounds.x() - callout_bounds.width()); |
826 else if (shelf_->GetAlignment() == wm::SHELF_ALIGNMENT_RIGHT) | 826 else if (shelf_->GetAlignment() == SHELF_ALIGNMENT_RIGHT) |
827 callout_bounds.set_x(bounds.right()); | 827 callout_bounds.set_x(bounds.right()); |
828 else | 828 else |
829 callout_bounds.set_y(bounds.bottom()); | 829 callout_bounds.set_y(bounds.bottom()); |
830 callout_bounds = callout_widget_window->GetParent()->ConvertRectFromScreen( | 830 callout_bounds = callout_widget_window->GetParent()->ConvertRectFromScreen( |
831 callout_bounds); | 831 callout_bounds); |
832 | 832 |
833 callout_widget_window->SetBoundsDirect(callout_bounds); | 833 callout_widget_window->SetBoundsDirect(callout_bounds); |
834 panel_container_->StackChildAbove(callout_widget_window, panel); | 834 panel_container_->StackChildAbove(callout_widget_window, panel); |
835 | 835 |
836 ui::Layer* layer = callout_widget_window->GetLayer(); | 836 ui::Layer* layer = callout_widget_window->GetLayer(); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
893 // Keyboard hidden, restore original bounds if they exist. | 893 // Keyboard hidden, restore original bounds if they exist. |
894 panel->SetBoundsDirect(panel_state->GetRestoreBoundsInScreen()); | 894 panel->SetBoundsDirect(panel_state->GetRestoreBoundsInScreen()); |
895 } | 895 } |
896 } | 896 } |
897 // This bounds change will have caused a change to the Shelf which does not | 897 // This bounds change will have caused a change to the Shelf which does not |
898 // propogate automatically to this class, so manually recalculate bounds. | 898 // propogate automatically to this class, so manually recalculate bounds. |
899 OnWindowResized(); | 899 OnWindowResized(); |
900 } | 900 } |
901 | 901 |
902 } // namespace ash | 902 } // namespace ash |
OLD | NEW |