| 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/wallpaper/wallpaper_view.h" | 5 #include "ash/common/wallpaper/wallpaper_view.h" |
| 6 | 6 |
| 7 #include "ash/common/session/session_state_delegate.h" | 7 #include "ash/common/session/session_state_delegate.h" |
| 8 #include "ash/common/wallpaper/wallpaper_controller.h" | 8 #include "ash/common/wallpaper/wallpaper_controller.h" |
| 9 #include "ash/common/wallpaper/wallpaper_delegate.h" | 9 #include "ash/common/wallpaper/wallpaper_delegate.h" |
| 10 #include "ash/common/wallpaper/wallpaper_widget_controller.h" | 10 #include "ash/common/wallpaper/wallpaper_widget_controller.h" |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 | 188 |
| 189 void WallpaperView::ShowContextMenuForView(views::View* source, | 189 void WallpaperView::ShowContextMenuForView(views::View* source, |
| 190 const gfx::Point& point, | 190 const gfx::Point& point, |
| 191 ui::MenuSourceType source_type) { | 191 ui::MenuSourceType source_type) { |
| 192 WmShell::Get()->ShowContextMenu(point, source_type); | 192 WmShell::Get()->ShowContextMenu(point, source_type); |
| 193 } | 193 } |
| 194 | 194 |
| 195 views::Widget* CreateWallpaper(WmWindow* root_window, int container_id) { | 195 views::Widget* CreateWallpaper(WmWindow* root_window, int container_id) { |
| 196 WallpaperController* controller = | 196 WallpaperController* controller = |
| 197 Shell::GetInstance()->wallpaper_controller(); | 197 Shell::GetInstance()->wallpaper_controller(); |
| 198 WallpaperDelegate* wallpaper_delegate = WmShell::Get()->wallpaper_delegate(); | 198 WallpaperDelegate* wallpaper_delegate = Shell::Get()->wallpaper_delegate(); |
| 199 | 199 |
| 200 views::Widget* wallpaper_widget = new views::Widget; | 200 views::Widget* wallpaper_widget = new views::Widget; |
| 201 views::Widget::InitParams params( | 201 views::Widget::InitParams params( |
| 202 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); | 202 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); |
| 203 params.name = "WallpaperView"; | 203 params.name = "WallpaperView"; |
| 204 if (controller->GetWallpaper().isNull()) | 204 if (controller->GetWallpaper().isNull()) |
| 205 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; | 205 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; |
| 206 root_window->GetRootWindowController()->ConfigureWidgetInitParamsForContainer( | 206 root_window->GetRootWindowController()->ConfigureWidgetInitParamsForContainer( |
| 207 wallpaper_widget, container_id, ¶ms); | 207 wallpaper_widget, container_id, ¶ms); |
| 208 wallpaper_widget->Init(params); | 208 wallpaper_widget->Init(params); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 233 // Disable animation if transition to login screen from an empty background. | 233 // Disable animation if transition to login screen from an empty background. |
| 234 wallpaper_window->SetVisibilityAnimationTransition(::wm::ANIMATE_NONE); | 234 wallpaper_window->SetVisibilityAnimationTransition(::wm::ANIMATE_NONE); |
| 235 } | 235 } |
| 236 | 236 |
| 237 WmWindow* container = root_window->GetChildByShellWindowId(container_id); | 237 WmWindow* container = root_window->GetChildByShellWindowId(container_id); |
| 238 wallpaper_widget->SetBounds(container->GetBounds()); | 238 wallpaper_widget->SetBounds(container->GetBounds()); |
| 239 return wallpaper_widget; | 239 return wallpaper_widget; |
| 240 } | 240 } |
| 241 | 241 |
| 242 } // namespace ash | 242 } // namespace ash |
| OLD | NEW |