diff options
author | mnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-01 11:28:22 +0000 |
---|---|---|
committer | mnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-01 11:28:22 +0000 |
commit | cb371f9e93fbc1d9ea1585da97ea8f07241eae36 (patch) | |
tree | da6aa4223510135eb08246966e65639aeaa2988c /ash/desktop_background | |
parent | 15089d7fb0cef3bb393f945dee90287ac4c4f17a (diff) | |
download | chromium_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')
5 files changed, 0 insertions, 60 deletions
diff --git a/ash/desktop_background/desktop_background_controller.cc b/ash/desktop_background/desktop_background_controller.cc index bdbad05..0bd8b35 100644 --- a/ash/desktop_background/desktop_background_controller.cc +++ b/ash/desktop_background/desktop_background_controller.cc @@ -246,16 +246,6 @@ void DesktopBackgroundController::MoveDesktopToLockedContainer() { GetBackgroundContainerId(true)); } -void DesktopBackgroundController::CleanupView(aura::RootWindow* root_window) { - internal::ComponentWrapper *wrapper; - wrapper = root_window->GetProperty(internal::kComponentWrapper); - if (NULL == wrapper) - return; - if (wrapper->GetComponent(false)) - wrapper->GetComponent(false)->CleanupWidget(); -} - - void DesktopBackgroundController::MoveDesktopToUnlockedContainer() { if (!locked_) return; diff --git a/ash/desktop_background/desktop_background_controller.h b/ash/desktop_background/desktop_background_controller.h index 71eb8ff..0251c1c 100644 --- a/ash/desktop_background/desktop_background_controller.h +++ b/ash/desktop_background/desktop_background_controller.h @@ -125,10 +125,6 @@ class ASH_EXPORT DesktopBackgroundController : public aura::WindowObserver { // Move all desktop widgets to unlocked container. void MoveDesktopToUnlockedContainer(); - // Drop references to background view for |root_window|, because the view - // was deleted. - void CleanupView(aura::RootWindow* root_window); - // WindowObserver implementation. virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; 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); diff --git a/ash/desktop_background/desktop_background_widget_controller.cc b/ash/desktop_background/desktop_background_widget_controller.cc index 8ee45ed..cb7a369 100644 --- a/ash/desktop_background/desktop_background_widget_controller.cc +++ b/ash/desktop_background/desktop_background_widget_controller.cc @@ -34,10 +34,6 @@ DesktopBackgroundWidgetController::~DesktopBackgroundWidgetController() { layer_.reset(NULL); } -void DesktopBackgroundWidgetController::CleanupWidget() { - widget_ = NULL; -} - void DesktopBackgroundWidgetController::SetBounds(gfx::Rect bounds) { if (widget_) widget_->SetBounds(bounds); diff --git a/ash/desktop_background/desktop_background_widget_controller.h b/ash/desktop_background/desktop_background_widget_controller.h index 41288cd..6a24716 100644 --- a/ash/desktop_background/desktop_background_widget_controller.h +++ b/ash/desktop_background/desktop_background_widget_controller.h @@ -28,9 +28,6 @@ class DesktopBackgroundWidgetController { ~DesktopBackgroundWidgetController(); - // Drop widget reference. widget is not owned. - void CleanupWidget(); - // Set bounds of component that draws background. void SetBounds(gfx::Rect bounds); |