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

Side by Side Diff: ash/common/wallpaper/wallpaper_view.cc

Issue 2741273002: chromeos: Promotes more from WmShell to Shell (Closed)
Patch Set: feedback Created 3 years, 9 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
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/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
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, &params); 207 wallpaper_widget, container_id, &params);
208 wallpaper_widget->Init(params); 208 wallpaper_widget->Init(params);
(...skipping 24 matching lines...) Expand all
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
OLDNEW
« no previous file with comments | « ash/common/wallpaper/wallpaper_controller_unittest.cc ('k') | ash/common/wallpaper/wallpaper_widget_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698