summaryrefslogtreecommitdiffstats
path: root/ui/aura/window.h
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-13 00:05:33 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-13 00:05:33 +0000
commit9fc206d750355b6bb698e50e9c6bc6ef669a7bfe (patch)
tree6120821a75162a499a66846d762639539ee8bc60 /ui/aura/window.h
parent374b3a6d971aa8f551e521167f8d130c90ffb8f8 (diff)
downloadchromium_src-9fc206d750355b6bb698e50e9c6bc6ef669a7bfe.zip
chromium_src-9fc206d750355b6bb698e50e9c6bc6ef669a7bfe.tar.gz
chromium_src-9fc206d750355b6bb698e50e9c6bc6ef669a7bfe.tar.bz2
Move the concept of Activation to the Shell.
The Active Window is now stored in a property on the RootWindow. Classes wishing to observe changes to this can implement WindowObserver and attach to the RootWindow to be notified of changes in this property. We provide an ActivationClient interface in Aura for customers to use to set/get the active window, and deactivate a window. This is because setting the active window involves more than just changing the property, there is some additional book-keeping that must be done. The ActivationClient is stored in a property on the RootWindow. We also provide an ActivationDelegate interface in Aura that window owners can use to be notified of changes in activation state, and to specify whether or not a window can be activated. The ActivationDelegate should be stored on the relevant window in a property. I moved a lot of Activation-related functionality out of Aura, including all of the unit tests, now on ActivationController, and the associated WindowDelegate implementations which have now become a single TestActivationDelegate implementation. BUG=none TEST=unit tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=114095 Review URL: http://codereview.chromium.org/8894018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114121 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura/window.h')
-rw-r--r--ui/aura/window.h14
1 files changed, 2 insertions, 12 deletions
diff --git a/ui/aura/window.h b/ui/aura/window.h
index 2c77d39..dcd115d 100644
--- a/ui/aura/window.h
+++ b/ui/aura/window.h
@@ -92,14 +92,6 @@ class AURA_EXPORT Window : public ui::LayerDelegate {
// Returns the window's bounds in screen coordinates.
gfx::Rect GetScreenBounds() const;
- // Activates this window. Only top level windows can be activated. Requests
- // to activate a non-top level window are ignored.
- void Activate();
-
- // Deactivates this window. Only top level windows can be
- // deactivated. Requests to deactivate a non-top level window are ignored.
- void Deactivate();
-
// Returns true if this window is active.
bool IsActive() const;
@@ -135,9 +127,6 @@ class AURA_EXPORT Window : public ui::LayerDelegate {
// |other|.
void StackChildAbove(Window* child, Window* other);
- // Returns true if this window can be activated.
- bool CanActivate() const;
-
// Tree operations.
// TODO(beng): Child windows are currently not owned by the hierarchy. We
// should change this.
@@ -248,7 +237,8 @@ class AURA_EXPORT Window : public ui::LayerDelegate {
// Sets the window property |value| for given |name|. Setting NULL or 0
// removes the property. It uses |ui::ViewProp| to store the property.
- // Please see the description of |prop_map_| for more details.
+ // Please see the description of |prop_map_| for more details. The caller is
+ // responsible for the lifetime of any object set as a property on the Window.
void SetProperty(const char* name, void* value);
void SetIntProperty(const char* name, int value);