| 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 (height() - wallpaper.height()) / 2); | 145 (height() - wallpaper.height()) / 2); |
| 146 } | 146 } |
| 147 } | 147 } |
| 148 | 148 |
| 149 bool DesktopBackgroundView::OnMousePressed(const ui::MouseEvent& event) { | 149 bool DesktopBackgroundView::OnMousePressed(const ui::MouseEvent& event) { |
| 150 return true; | 150 return true; |
| 151 } | 151 } |
| 152 | 152 |
| 153 void DesktopBackgroundView::ShowContextMenuForView(views::View* source, | 153 void DesktopBackgroundView::ShowContextMenuForView(views::View* source, |
| 154 const gfx::Point& point) { | 154 const gfx::Point& point) { |
| 155 Shell::GetInstance()->ShowBackgroundMenu(GetWidget(), point); | 155 Shell::GetInstance()->ShowContextMenu(point); |
| 156 } | 156 } |
| 157 | 157 |
| 158 views::Widget* CreateDesktopBackground(aura::RootWindow* root_window, | 158 views::Widget* CreateDesktopBackground(aura::RootWindow* root_window, |
| 159 int container_id) { | 159 int container_id) { |
| 160 DesktopBackgroundController* controller = | 160 DesktopBackgroundController* controller = |
| 161 ash::Shell::GetInstance()->desktop_background_controller(); | 161 ash::Shell::GetInstance()->desktop_background_controller(); |
| 162 views::Widget* desktop_widget = new views::Widget; | 162 views::Widget* desktop_widget = new views::Widget; |
| 163 views::Widget::InitParams params( | 163 views::Widget::InitParams params( |
| 164 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); | 164 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); |
| 165 if (controller->GetWallpaper().isNull()) | 165 if (controller->GetWallpaper().isNull()) |
| (...skipping 22 matching lines...) Expand all Loading... |
| 188 settings.SetPreemptionStrategy(ui::LayerAnimator::ENQUEUE_NEW_ANIMATION); | 188 settings.SetPreemptionStrategy(ui::LayerAnimator::ENQUEUE_NEW_ANIMATION); |
| 189 settings.AddObserver(new ShowWallpaperAnimationObserver(root_window, | 189 settings.AddObserver(new ShowWallpaperAnimationObserver(root_window, |
| 190 desktop_widget)); | 190 desktop_widget)); |
| 191 desktop_widget->Show(); | 191 desktop_widget->Show(); |
| 192 desktop_widget->GetNativeView()->SetName("DesktopBackgroundView"); | 192 desktop_widget->GetNativeView()->SetName("DesktopBackgroundView"); |
| 193 return desktop_widget; | 193 return desktop_widget; |
| 194 } | 194 } |
| 195 | 195 |
| 196 } // namespace internal | 196 } // namespace internal |
| 197 } // namespace ash | 197 } // namespace ash |
| OLD | NEW |