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

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

Issue 1900443002: Removes aura dependencies from WindowPositioner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nuke GetWorkAreaForWindowInParent and fix windows Created 4 years, 8 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
« no previous file with comments | « ash/default_user_wallpaper_delegate.cc ('k') | ash/magnifier/magnification_controller.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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 views::Widget* desktop_widget = new views::Widget; 214 views::Widget* desktop_widget = new views::Widget;
215 views::Widget::InitParams params( 215 views::Widget::InitParams params(
216 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); 216 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
217 if (controller->GetWallpaper().isNull()) 217 if (controller->GetWallpaper().isNull())
218 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; 218 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
219 params.parent = root_window->GetChildById(container_id); 219 params.parent = root_window->GetChildById(container_id);
220 desktop_widget->Init(params); 220 desktop_widget->Init(params);
221 desktop_widget->SetContentsView( 221 desktop_widget->SetContentsView(
222 new LayerControlView(new DesktopBackgroundView())); 222 new LayerControlView(new DesktopBackgroundView()));
223 int animation_type = wallpaper_delegate->GetAnimationType(); 223 int animation_type = wallpaper_delegate->GetAnimationType();
224 wm::SetWindowVisibilityAnimationType( 224 ::wm::SetWindowVisibilityAnimationType(desktop_widget->GetNativeView(),
225 desktop_widget->GetNativeView(), animation_type); 225 animation_type);
226 226
227 RootWindowController* root_window_controller = 227 RootWindowController* root_window_controller =
228 GetRootWindowController(root_window); 228 GetRootWindowController(root_window);
229 229
230 // Enable wallpaper transition for the following cases: 230 // Enable wallpaper transition for the following cases:
231 // 1. Initial(OOBE) wallpaper animation. 231 // 1. Initial(OOBE) wallpaper animation.
232 // 2. Wallpaper fades in from a non empty background. 232 // 2. Wallpaper fades in from a non empty background.
233 // 3. From an empty background, chrome transit to a logged in user session. 233 // 3. From an empty background, chrome transit to a logged in user session.
234 // 4. From an empty background, guest user logged in. 234 // 4. From an empty background, guest user logged in.
235 if (wallpaper_delegate->ShouldShowInitialAnimation() || 235 if (wallpaper_delegate->ShouldShowInitialAnimation() ||
236 root_window_controller->animating_wallpaper_controller() || 236 root_window_controller->animating_wallpaper_controller() ||
237 Shell::GetInstance()->session_state_delegate()->NumberOfLoggedInUsers()) { 237 Shell::GetInstance()->session_state_delegate()->NumberOfLoggedInUsers()) {
238 wm::SetWindowVisibilityAnimationTransition( 238 ::wm::SetWindowVisibilityAnimationTransition(
239 desktop_widget->GetNativeView(), wm::ANIMATE_SHOW); 239 desktop_widget->GetNativeView(), ::wm::ANIMATE_SHOW);
240 int duration_override = wallpaper_delegate->GetAnimationDurationOverride(); 240 int duration_override = wallpaper_delegate->GetAnimationDurationOverride();
241 if (duration_override) { 241 if (duration_override) {
242 wm::SetWindowVisibilityAnimationDuration( 242 ::wm::SetWindowVisibilityAnimationDuration(
243 desktop_widget->GetNativeView(), 243 desktop_widget->GetNativeView(),
244 base::TimeDelta::FromMilliseconds(duration_override)); 244 base::TimeDelta::FromMilliseconds(duration_override));
245 } 245 }
246 } else { 246 } else {
247 // Disable animation if transition to login screen from an empty background. 247 // Disable animation if transition to login screen from an empty background.
248 wm::SetWindowVisibilityAnimationTransition( 248 ::wm::SetWindowVisibilityAnimationTransition(
249 desktop_widget->GetNativeView(), wm::ANIMATE_NONE); 249 desktop_widget->GetNativeView(), ::wm::ANIMATE_NONE);
250 } 250 }
251 251
252 desktop_widget->SetBounds(params.parent->bounds()); 252 desktop_widget->SetBounds(params.parent->bounds());
253 return desktop_widget; 253 return desktop_widget;
254 } 254 }
255 255
256 } // namespace ash 256 } // namespace ash
OLDNEW
« no previous file with comments | « ash/default_user_wallpaper_delegate.cc ('k') | ash/magnifier/magnification_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698