summaryrefslogtreecommitdiffstats
path: root/ash/desktop_background/desktop_background_view.cc
diff options
context:
space:
mode:
authormnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-01 11:28:22 +0000
committermnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-01 11:28:22 +0000
commitcb371f9e93fbc1d9ea1585da97ea8f07241eae36 (patch)
treeda6aa4223510135eb08246966e65639aeaa2988c /ash/desktop_background/desktop_background_view.cc
parent15089d7fb0cef3bb393f945dee90287ac4c4f17a (diff)
downloadchromium_src-cb371f9e93fbc1d9ea1585da97ea8f07241eae36.zip
chromium_src-cb371f9e93fbc1d9ea1585da97ea8f07241eae36.tar.gz
chromium_src-cb371f9e93fbc1d9ea1585da97ea8f07241eae36.tar.bz2
Revert 154611 - "Forget about DesktopBackgroundView if it was deleted"
It failed to compile on the waterfall on various bots. BUG=None TEST=None TBR=antrim@chromium.org Review URL: https://chromiumcodereview.appspot.com/10915046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154612 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/desktop_background/desktop_background_view.cc')
-rw-r--r--ash/desktop_background/desktop_background_view.cc39
1 files changed, 0 insertions, 39 deletions
diff --git a/ash/desktop_background/desktop_background_view.cc b/ash/desktop_background/desktop_background_view.cc
index e79bc54..41345a2 100644
--- a/ash/desktop_background/desktop_background_view.cc
+++ b/ash/desktop_background/desktop_background_view.cc
@@ -23,47 +23,11 @@
#include "ui/gfx/canvas.h"
#include "ui/gfx/image/image.h"
#include "ui/views/widget/widget.h"
-#include "ui/views/widget/widget_delegate.h"
namespace ash {
namespace internal {
namespace {
-class DesktopBackgroundViewCleanup : public views::WidgetDelegate {
- public:
- DesktopBackgroundViewCleanup(views::Widget* widget,
- aura::RootWindow* root_window)
- : widget_(widget_),
- root_window_(root_window) {
- }
-
- // Called when the window closes. The delegate MUST NOT delete itself during
- // this call, since it can be called afterwards. See DeleteDelegate().
- virtual void WindowClosing() OVERRIDE {
- DesktopBackgroundController* controller = ash::Shell::GetInstance()->
- desktop_background_controller();
- controller->CleanupView(root_window_);
- }
-
- virtual const views::Widget* GetWidget() OVERRIDE const {
- return widget_;
- }
-
- virtual views::Widget* GetWidget() OVERRIDE {
- return widget_;
- }
-
- virtual void DeleteDelegate() OVERRIDE {
- delete this;
- }
-
- private:
- views::Widget* widget_;
- aura::RootWindow* root_window_;
-
- DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundViewCleanup);
-};
-
class ShowWallpaperAnimationObserver : public ui::ImplicitAnimationObserver {
public:
ShowWallpaperAnimationObserver(aura::RootWindow* root_window,
@@ -185,15 +149,12 @@ views::Widget* CreateDesktopBackground(aura::RootWindow* root_window,
DesktopBackgroundController* controller = ash::Shell::GetInstance()->
desktop_background_controller();
views::Widget* desktop_widget = new views::Widget;
- DesktopBackgroundViewCleanup* cleanup;
- cleanup = new DesktopBackgroundViewCleanup(desktop_widget, root_window);
views::Widget::InitParams params(
views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
DesktopBackgroundView* view = new DesktopBackgroundView();
params.delegate = view;
if (controller->GetWallpaper().isNull())
params.transparent = true;
- params.delegate = cleanup;
params.parent = root_window->GetChildById(container_id);
desktop_widget->Init(params);
desktop_widget->SetContentsView(view);