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

Unified Diff: ash/common/wm_window.h

Issue 2320273002: Refactors DimWindow and moves to ash/common (Closed)
Patch Set: git add wm_window Created 4 years, 3 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
Index: ash/common/wm_window.h
diff --git a/ash/common/wm_window.h b/ash/common/wm_window.h
index 6dfd2cad7ef6a110c7bf055cadf9382b651b3dff..c6a3234ecdaf268ab2d49a05965a4296c46701b0 100644
--- a/ash/common/wm_window.h
+++ b/ash/common/wm_window.h
@@ -10,12 +10,17 @@
#include "ash/ash_export.h"
#include "base/strings/string16.h"
+#include "base/supports_user_data.h"
James Cook 2016/09/09 00:03:36 nit: either skip this or skip the forward declare
sky 2016/09/09 03:50:04 Done.
#include "base/time/time.h"
#include "ui/base/ui_base_types.h"
#include "ui/compositor/layer_animation_element.h"
#include "ui/wm/core/window_animations.h"
#include "ui/wm/public/window_types.h"
+namespace base {
+class SupportsUserData;
+}
+
namespace display {
class Display;
}
@@ -64,6 +69,8 @@ class ASH_EXPORT WmWindow {
using Windows = std::vector<WmWindow*>;
+ virtual void Destroy() = 0;
+
WmWindow* GetRootWindow() {
return const_cast<WmWindow*>(
const_cast<const WmWindow*>(this)->GetRootWindow());
@@ -122,6 +129,10 @@ class ASH_EXPORT WmWindow {
virtual bool IsSystemModal() const = 0;
+ // Returns the base::SupportsUserData* owned by |this| that can be used to
+ // store arbitrary data.
+ base::SupportsUserData* GetUserData();
+
virtual bool GetBoolProperty(WmWindowProperty key) = 0;
virtual int GetIntProperty(WmWindowProperty key) = 0;
virtual void SetIntProperty(WmWindowProperty key, int value) = 0;
@@ -162,6 +173,7 @@ class ASH_EXPORT WmWindow {
virtual WmLayoutManager* GetLayoutManager() = 0;
// |type| is WindowVisibilityAnimationType. Has to be an int to match aura.
+ virtual void SetVisibilityChangesAnimated() = 0;
James Cook 2016/09/09 00:03:36 nit: move above comment. Also, a comment for this
sky 2016/09/09 03:50:04 I added a pointer to the function it mirrors.
virtual void SetVisibilityAnimationType(int type) = 0;
virtual void SetVisibilityAnimationDuration(base::TimeDelta delta) = 0;
virtual void SetVisibilityAnimationTransition(
@@ -315,7 +327,15 @@ class ASH_EXPORT WmWindow {
virtual void RemoveLimitedPreTargetHandler(ui::EventHandler* handler) = 0;
protected:
- virtual ~WmWindow() {}
+ WmWindow();
+ virtual ~WmWindow();
+
+ void DestroyUserData();
+
+ private:
+ class SupportsUserDataImpl;
+
+ std::unique_ptr<SupportsUserDataImpl> user_data_;
};
} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698