Chromium Code Reviews| 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_layout_manager.h" | 5 #include "ash/wm/panels/panel_layout_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "ash/launcher/launcher.h" | 10 #include "ash/launcher/launcher.h" |
| 11 #include "ash/screen_ash.h" | 11 #include "ash/screen_ash.h" |
| 12 #include "ash/shelf/shelf_layout_manager.h" | 12 #include "ash/shelf/shelf_layout_manager.h" |
| 13 #include "ash/shelf/shelf_types.h" | 13 #include "ash/shelf/shelf_types.h" |
| 14 #include "ash/shelf/shelf_widget.h" | 14 #include "ash/shelf/shelf_widget.h" |
| 15 #include "ash/shell.h" | 15 #include "ash/shell.h" |
| 16 #include "ash/wm/frame_painter.h" | 16 #include "ash/wm/frame_painter.h" |
| 17 #include "ash/wm/property_util.h" | 17 #include "ash/wm/property_util.h" |
| 18 #include "ash/wm/window_animations.h" | 18 #include "ash/wm/window_animations.h" |
| 19 #include "ash/wm/window_properties.h" | |
| 19 #include "ash/wm/window_util.h" | 20 #include "ash/wm/window_util.h" |
| 20 #include "base/auto_reset.h" | 21 #include "base/auto_reset.h" |
| 21 #include "base/bind.h" | 22 #include "base/bind.h" |
| 22 #include "base/bind_helpers.h" | 23 #include "base/bind_helpers.h" |
| 23 #include "third_party/skia/include/core/SkColor.h" | 24 #include "third_party/skia/include/core/SkColor.h" |
| 24 #include "third_party/skia/include/core/SkPaint.h" | 25 #include "third_party/skia/include/core/SkPaint.h" |
| 25 #include "third_party/skia/include/core/SkPath.h" | 26 #include "third_party/skia/include/core/SkPath.h" |
| 26 #include "ui/aura/client/activation_client.h" | 27 #include "ui/aura/client/activation_client.h" |
| 27 #include "ui/aura/client/aura_constants.h" | 28 #include "ui/aura/client/aura_constants.h" |
| 28 #include "ui/aura/focus_manager.h" | 29 #include "ui/aura/focus_manager.h" |
| (...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 657 on_launcher = true; | 658 on_launcher = true; |
| 658 } | 659 } |
| 659 | 660 |
| 660 if (on_launcher) { | 661 if (on_launcher) { |
| 661 ui::ScopedLayerAnimationSettings panel_slide_settings( | 662 ui::ScopedLayerAnimationSettings panel_slide_settings( |
| 662 layer->GetAnimator()); | 663 layer->GetAnimator()); |
| 663 panel_slide_settings.SetPreemptionStrategy( | 664 panel_slide_settings.SetPreemptionStrategy( |
| 664 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); | 665 ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); |
| 665 panel_slide_settings.SetTransitionDuration( | 666 panel_slide_settings.SetTransitionDuration( |
| 666 base::TimeDelta::FromMilliseconds(kPanelSlideDurationMilliseconds)); | 667 base::TimeDelta::FromMilliseconds(kPanelSlideDurationMilliseconds)); |
| 668 visible_panels[i].window->SetProperty(internal::kPanelAttachedKey, true); | |
|
flackr
2013/06/19 15:16:49
Any panel that's being managed by panel layout man
varkha
2013/06/19 15:49:22
This was not the case when the panel was getting a
flackr
2013/06/19 15:59:37
It's my understanding that even if an application
varkha
2013/06/19 17:54:09
The problem with dual screens was that SetBounds w
flackr
2013/06/19 20:24:46
When SetBounds is about to reparent the window, it
| |
| 667 SetChildBoundsDirect(visible_panels[i].window, bounds); | 669 SetChildBoundsDirect(visible_panels[i].window, bounds); |
| 668 if (slide_in) | 670 if (slide_in) |
| 669 layer->SetOpacity(1); | 671 layer->SetOpacity(1); |
| 670 } else { | 672 } else { |
| 671 // If the launcher moved don't animate, move immediately to the new | 673 // If the launcher moved don't animate, move immediately to the new |
| 672 // target location. | 674 // target location. |
| 673 SetChildBoundsDirect(visible_panels[i].window, bounds); | 675 SetChildBoundsDirect(visible_panels[i].window, bounds); |
| 674 } | 676 } |
| 675 } | 677 } |
| 676 | 678 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 824 | 826 |
| 825 void PanelLayoutManager::OnKeyboardBoundsChanging( | 827 void PanelLayoutManager::OnKeyboardBoundsChanging( |
| 826 const gfx::Rect& keyboard_bounds) { | 828 const gfx::Rect& keyboard_bounds) { |
| 827 // This bounds change will have caused a change to the Shelf which does not | 829 // This bounds change will have caused a change to the Shelf which does not |
| 828 // propogate automatically to this class, so manually recalculate bounds. | 830 // propogate automatically to this class, so manually recalculate bounds. |
| 829 OnWindowResized(); | 831 OnWindowResized(); |
| 830 } | 832 } |
| 831 | 833 |
| 832 } // namespace internal | 834 } // namespace internal |
| 833 } // namespace ash | 835 } // namespace ash |
| OLD | NEW |