| 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/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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 return true; | 167 return true; |
| 168 } | 168 } |
| 169 | 169 |
| 170 void DesktopBackgroundView::ShowContextMenuForView( | 170 void DesktopBackgroundView::ShowContextMenuForView( |
| 171 views::View* source, | 171 views::View* source, |
| 172 const gfx::Point& point, | 172 const gfx::Point& point, |
| 173 ui::MenuSourceType source_type) { | 173 ui::MenuSourceType source_type) { |
| 174 Shell::GetInstance()->ShowContextMenu(point, source_type); | 174 Shell::GetInstance()->ShowContextMenu(point, source_type); |
| 175 } | 175 } |
| 176 | 176 |
| 177 views::Widget* CreateDesktopBackground(aura::Window* root_window, | 177 views::Widget* CreateDesktopBackground(aura::RootWindow* root_window, |
| 178 int container_id) { | 178 int container_id) { |
| 179 DesktopBackgroundController* controller = | 179 DesktopBackgroundController* controller = |
| 180 Shell::GetInstance()->desktop_background_controller(); | 180 Shell::GetInstance()->desktop_background_controller(); |
| 181 UserWallpaperDelegate* wallpaper_delegate = | 181 UserWallpaperDelegate* wallpaper_delegate = |
| 182 Shell::GetInstance()->user_wallpaper_delegate(); | 182 Shell::GetInstance()->user_wallpaper_delegate(); |
| 183 | 183 |
| 184 views::Widget* desktop_widget = new views::Widget; | 184 views::Widget* desktop_widget = new views::Widget; |
| 185 views::Widget::InitParams params( | 185 views::Widget::InitParams params( |
| 186 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); | 186 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); |
| 187 if (controller->GetWallpaper().isNull()) | 187 if (controller->GetWallpaper().isNull()) |
| (...skipping 24 matching lines...) Expand all Loading... |
| 212 views::corewm::SetWindowVisibilityAnimationTransition( | 212 views::corewm::SetWindowVisibilityAnimationTransition( |
| 213 desktop_widget->GetNativeView(), views::corewm::ANIMATE_NONE); | 213 desktop_widget->GetNativeView(), views::corewm::ANIMATE_NONE); |
| 214 } | 214 } |
| 215 | 215 |
| 216 desktop_widget->SetBounds(params.parent->bounds()); | 216 desktop_widget->SetBounds(params.parent->bounds()); |
| 217 return desktop_widget; | 217 return desktop_widget; |
| 218 } | 218 } |
| 219 | 219 |
| 220 } // namespace internal | 220 } // namespace internal |
| 221 } // namespace ash | 221 } // namespace ash |
| OLD | NEW |