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

Unified Diff: ash/wm/common/wm_window_observer.h

Issue 1890713002: Adds WmWindow and converts WindowState to use it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge again Created 4 years, 8 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/wm/common/wm_window.h ('k') | ash/wm/common/wm_window_property.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/common/wm_window_observer.h
diff --git a/ash/wm/common/wm_window_observer.h b/ash/wm/common/wm_window_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..97500c0e4bdb8a6af6bc1b36044f80b16c96fbf2
--- /dev/null
+++ b/ash/wm/common/wm_window_observer.h
@@ -0,0 +1,52 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_WM_COMMON_WM_WINDOW_OBSERVER_H_
+#define ASH_WM_COMMON_WM_WINDOW_OBSERVER_H_
+
+#include "ash/ash_export.h"
+
+namespace gfx {
+class Rect;
+}
+
+namespace ash {
+namespace wm {
+
+class WmWindow;
+enum class WmWindowProperty;
+
+class ASH_EXPORT WmWindowObserver {
+ public:
+ struct TreeChangeParams {
+ WmWindow* target = nullptr;
+ WmWindow* old_parent = nullptr;
+ WmWindow* new_parent = nullptr;
+ };
+
+ // |window| is the window the observer was added to, which is not necessarily
+ // the window that was added/removed.
+ virtual void OnWindowTreeChanged(WmWindow* window,
+ const TreeChangeParams& params) {}
+
+ virtual void OnWindowPropertyChanged(WmWindow* window,
+ WmWindowProperty property,
+ intptr_t old) {}
+
+ virtual void OnWindowStackingChanged(WmWindow* window) {}
+
+ virtual void OnWindowDestroying(WmWindow* window) {}
+
+ virtual void OnWindowBoundsChanged(WmWindow* window,
+ const gfx::Rect& old_bounds,
+ const gfx::Rect& new_bounds) {}
+
+ protected:
+ virtual ~WmWindowObserver() {}
+};
+
+} // namespace wm
+} // namespace ash
+
+#endif // ASH_WM_COMMON_WM_WINDOW_OBSERVER_H_
« no previous file with comments | « ash/wm/common/wm_window.h ('k') | ash/wm/common/wm_window_property.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698