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

Side by Side Diff: ash/desktop_background/desktop_background_view.cc

Issue 10800020: Add brightness/grayscale animations and use them for OOBE boot transition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix hide animation Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « ash/desktop_background/desktop_background_controller.h ('k') | ash/shell.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/desktop_background/desktop_background_view.h" 5 #include "ash/desktop_background/desktop_background_view.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "ash/ash_export.h" 9 #include "ash/ash_export.h"
10 #include "ash/desktop_background/desktop_background_controller.h" 10 #include "ash/desktop_background/desktop_background_controller.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 views::Widget::InitParams params( 145 views::Widget::InitParams params(
146 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); 146 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
147 DesktopBackgroundView* view = new DesktopBackgroundView(); 147 DesktopBackgroundView* view = new DesktopBackgroundView();
148 params.delegate = view; 148 params.delegate = view;
149 if (controller->GetWallpaper().empty()) 149 if (controller->GetWallpaper().empty())
150 params.transparent = true; 150 params.transparent = true;
151 params.parent = root_window->GetChildById( 151 params.parent = root_window->GetChildById(
152 ash::internal::kShellWindowId_DesktopBackgroundContainer); 152 ash::internal::kShellWindowId_DesktopBackgroundContainer);
153 desktop_widget->Init(params); 153 desktop_widget->Init(params);
154 desktop_widget->SetContentsView(view); 154 desktop_widget->SetContentsView(view);
155 ash::SetWindowVisibilityAnimationType( 155 ash::WindowVisibilityAnimationType animation_type =
156 desktop_widget->GetNativeView(), 156 ash::Shell::GetInstance()->user_wallpaper_delegate()->GetAnimationType();
157 ash::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE); 157 ash::SetWindowVisibilityAnimationType(desktop_widget->GetNativeView(),
158 ash::SetWindowVisibilityAnimationTransition( 158 animation_type);
159 desktop_widget->GetNativeView(), 159 ash::SetWindowVisibilityAnimationTransition(desktop_widget->GetNativeView(),
160 ash::ANIMATE_SHOW); 160 ash::ANIMATE_SHOW);
161 desktop_widget->SetBounds(params.parent->bounds()); 161 desktop_widget->SetBounds(params.parent->bounds());
162 ui::ScopedLayerAnimationSettings settings(desktop_widget->GetNativeView()-> 162 ui::ScopedLayerAnimationSettings settings(
163 layer()->GetAnimator()); 163 desktop_widget->GetNativeView()->layer()->GetAnimator());
164 settings.SetPreemptionStrategy(ui::LayerAnimator::ENQUEUE_NEW_ANIMATION); 164 settings.SetPreemptionStrategy(ui::LayerAnimator::ENQUEUE_NEW_ANIMATION);
165 settings.AddObserver(new ShowWallpaperAnimationObserver(root_window, 165 settings.AddObserver(new ShowWallpaperAnimationObserver(root_window,
166 desktop_widget)); 166 desktop_widget));
167 desktop_widget->Show(); 167 desktop_widget->Show();
168 desktop_widget->GetNativeView()->SetName("DesktopBackgroundView"); 168 desktop_widget->GetNativeView()->SetName("DesktopBackgroundView");
169 } 169 }
170 170
171 } // namespace internal 171 } // namespace internal
172 } // namespace ash 172 } // namespace ash
OLDNEW
« no previous file with comments | « ash/desktop_background/desktop_background_controller.h ('k') | ash/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698