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

Unified Diff: ash/system/tray/system_tray_bubble.cc

Issue 15114002: Reorder the NativeViews attached to a view via kViewHostKey according to the position of the view (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/aura/window.h » ('j') | ui/aura/window.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/system_tray_bubble.cc
diff --git a/ash/system/tray/system_tray_bubble.cc b/ash/system/tray/system_tray_bubble.cc
index a88a40b0283c733eb3a5f4a1f822189130abd43e..d44dc9410b98576cdea86cf57330df29affe01fb 100644
--- a/ash/system/tray/system_tray_bubble.cc
+++ b/ash/system/tray/system_tray_bubble.cc
@@ -167,9 +167,6 @@ void SystemTrayBubble::UpdateView(
// When transitioning from detailed view to default view, animate the
// existing view (slide out towards the right).
if (bubble_type == BUBBLE_TYPE_DEFAULT) {
- // Make sure the old view is visibile over the new view during the
- // animation.
- layer->parent()->StackAbove(layer, bubble_view_->layer());
ui::ScopedLayerAnimationSettings settings(layer->GetAnimator());
settings.AddObserver(
new AnimationObserverDeleteLayer(scoped_layer.release()));
@@ -230,6 +227,11 @@ void SystemTrayBubble::UpdateView(
// view (slide in from the right).
if (bubble_type == BUBBLE_TYPE_DETAILED) {
ui::Layer* new_layer = bubble_view_->layer();
+
+ // Make sure the new layer is stacked above the old layer during the
+ // animation.
+ new_layer->parent()->StackAbove(new_layer, scoped_layer.get());
+
gfx::Rect bounds = new_layer->bounds();
gfx::Transform transform;
transform.Translate(bounds.width(), 0.0);
« no previous file with comments | « no previous file | ui/aura/window.h » ('j') | ui/aura/window.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698