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

Unified Diff: ash/common/wm/maximize_mode/workspace_backdrop_delegate.cc

Issue 2699033002: Replace WmWindowObserver with aura::WindowObserver. (Closed)
Patch Set: Check for null images in ShelfWindowWatcher. Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/common/wm/maximize_mode/maximize_mode_window_manager.cc ('k') | ash/common/wm/mru_window_tracker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm/maximize_mode/workspace_backdrop_delegate.cc
diff --git a/ash/common/wm/maximize_mode/workspace_backdrop_delegate.cc b/ash/common/wm/maximize_mode/workspace_backdrop_delegate.cc
index c29c9db7fdbc3a805f1d79dd623f7887685855ff..3862e76a32eb46eae9e55a3220faedb6e50e8a6a 100644
--- a/ash/common/wm/maximize_mode/workspace_backdrop_delegate.cc
+++ b/ash/common/wm/maximize_mode/workspace_backdrop_delegate.cc
@@ -7,10 +7,10 @@
#include "ash/common/wm/workspace/workspace_layout_manager_backdrop_delegate.h"
#include "ash/common/wm_lookup.h"
#include "ash/common/wm_window.h"
-#include "ash/common/wm_window_observer.h"
#include "ash/public/cpp/shell_window_ids.h"
#include "ash/root_window_controller.h"
#include "base/auto_reset.h"
+#include "ui/aura/window_observer.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/scoped_layer_animation_settings.h"
#include "ui/views/background.h"
@@ -26,15 +26,16 @@ const float kBackdropOpacity = 0.5f;
} // namespace
-class WorkspaceBackdropDelegate::WindowObserverImpl : public WmWindowObserver {
+class WorkspaceBackdropDelegate::WindowObserverImpl
+ : public aura::WindowObserver {
public:
explicit WindowObserverImpl(WorkspaceBackdropDelegate* delegate)
: delegate_(delegate) {}
~WindowObserverImpl() override {}
private:
- // WmWindowObserver overrides:
- void OnWindowBoundsChanged(WmWindow* window,
+ // aura::WindowObserver overrides:
+ void OnWindowBoundsChanged(aura::Window* window,
const gfx::Rect& old_bounds,
const gfx::Rect& new_bounds) override {
// The container size has changed and the layer needs to be adapt to it.
@@ -73,11 +74,11 @@ WorkspaceBackdropDelegate::WorkspaceBackdropDelegate(WmWindow* container)
DCHECK(background_window_->GetBounds() == params.bounds);
Show();
RestackBackdrop();
- container_->AddObserver(container_observer_.get());
+ container_->aura_window()->AddObserver(container_observer_.get());
}
WorkspaceBackdropDelegate::~WorkspaceBackdropDelegate() {
- container_->RemoveObserver(container_observer_.get());
+ container_->aura_window()->RemoveObserver(container_observer_.get());
// TODO: animations won't work right with mus: http://crbug.com/548396.
::wm::ScopedHidingAnimationSettings hiding_settings(
background_->GetNativeView());
« no previous file with comments | « ash/common/wm/maximize_mode/maximize_mode_window_manager.cc ('k') | ash/common/wm/mru_window_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698