summaryrefslogtreecommitdiffstats
path: root/ui/aura/window.h
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-27 00:07:53 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-27 00:07:53 +0000
commit1e55cc910f25c8af743d5941ccdffd836bdf1de6 (patch)
treec1b5ad6e7026abcf88998619ed48d93c5a7a1cfa /ui/aura/window.h
parentd5c14067f0153540b6f6f0f7a807b5f77b6877d6 (diff)
downloadchromium_src-1e55cc910f25c8af743d5941ccdffd836bdf1de6.zip
chromium_src-1e55cc910f25c8af743d5941ccdffd836bdf1de6.tar.gz
chromium_src-1e55cc910f25c8af743d5941ccdffd836bdf1de6.tar.bz2
Move view property implmentation from NativeWidgetAura to window.
BUG=none TEST=tbw Review URL: http://codereview.chromium.org/8395039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107477 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura/window.h')
-rw-r--r--ui/aura/window.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/ui/aura/window.h b/ui/aura/window.h
index 8b236e2..a809f5d 100644
--- a/ui/aura/window.h
+++ b/ui/aura/window.h
@@ -6,6 +6,7 @@
#define UI_AURA_WINDOW_H_
#pragma once
+#include <map>
#include <vector>
#include "base/basictypes.h"
@@ -27,6 +28,7 @@ class Animation;
class Compositor;
class Layer;
class Transform;
+class ViewProp;
}
namespace aura {
@@ -256,6 +258,15 @@ class AURA_EXPORT Window : public ui::LayerDelegate {
// Returns true if this window is fullscreen or contains a fullscreen window.
bool IsOrContainsFullscreenWindow() const;
+ // Sets the window property |value| for given |name|. Setting NULL
+ // removes the property. It uses |ui::ViewProp| to store the property.
+ // Please see the description of |prop_map_| for more details.
+ void SetProperty(const char* name, void* value);
+
+ // Returns the window property for given |name|. Returns NULL if
+ // the property does not exist.
+ void* GetProperty(const char* name) const;
+
// Returns an animation configured with the default duration. All animations
// should use this. Caller owns returned value.
static ui::Animation* CreateDefaultAnimation();
@@ -338,6 +349,13 @@ class AURA_EXPORT Window : public ui::LayerDelegate {
ObserverList<WindowObserver> observers_;
+ // We're using ViewProp to store the property (for now) instead of
+ // just using std::map because chrome is still using |ViewProp| class
+ // to create and access property.
+ // TODO(oshima): Consolidcate ViewProp and aura::window property
+ // implementation.
+ std::map<const char*, ui::ViewProp*> prop_map_;
+
DISALLOW_COPY_AND_ASSIGN(Window);
};