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

Unified Diff: ui/aura/window.h

Issue 8194004: change the way windows are parented when their parent is set to NULL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 | « ui/aura/toplevel_window_container.cc ('k') | ui/aura/window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window.h
===================================================================
--- ui/aura/window.h (revision 104542)
+++ ui/aura/window.h (working copy)
@@ -32,6 +32,7 @@
class KeyEvent;
class LayoutManager;
class MouseEvent;
+class ToplevelWindowContainer;
class WindowDelegate;
namespace internal {
@@ -51,6 +52,9 @@
void Init();
+ int type() const { return type_; }
+ void SetType(int type);
+
int id() const { return id_; }
void set_id(int id) { id_ = id; }
@@ -97,13 +101,18 @@
void SetParent(Window* parent);
Window* parent() { return parent_; }
- // Returns true if this Window is the container for toplevel windows.
- virtual bool IsToplevelWindowContainer() const;
+ // RTTI to a container for top-level windows. Returns NULL if this window is
+ // not a top level window container.
+ virtual ToplevelWindowContainer* AsToplevelWindowContainer();
+ virtual const ToplevelWindowContainer* AsToplevelWindowContainer() const;
// Move the specified child of this Window to the front of the z-order.
// TODO(beng): this is (obviously) feeble.
void MoveChildToFront(Window* child);
+ // 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.
@@ -115,6 +124,7 @@
// Retrieves the first-level child with the specified id, or NULL if no first-
// level child is found matching |id|.
Window* GetChildById(int id);
+ const Window* GetChildById(int id) const;
static void ConvertPointToWindow(Window* source,
Window* target,
@@ -206,6 +216,8 @@
// if |new_show_state| is same as current show state.
bool UpdateShowStateAndRestoreBounds(ui::WindowShowState new_show_state);
+ int type_;
+
WindowDelegate* delegate_;
ui::WindowShowState show_state_;
« no previous file with comments | « ui/aura/toplevel_window_container.cc ('k') | ui/aura/window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698