diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-25 22:35:13 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-25 22:35:13 +0000 |
commit | 8d8c773c297d22dbf01e2bbb69b7335f52208845 (patch) | |
tree | d45e8affaa57b2dd2516e14c03c3a5f9238247f0 /aura/window.h | |
parent | 93543752960447decfc8f0ca38ef9f44f7209cfd (diff) | |
download | chromium_src-8d8c773c297d22dbf01e2bbb69b7335f52208845.zip chromium_src-8d8c773c297d22dbf01e2bbb69b7335f52208845.tar.gz chromium_src-8d8c773c297d22dbf01e2bbb69b7335f52208845.tar.bz2 |
Re-land: Create a new views_aura_desktop.
Get views::Widget rendering working against an aura::Window NativeWidget.
http://crbug.com/93944
TEST=none
Original review URL: http://codereview.chromium.org/7741027
Review URL: http://codereview.chromium.org/7747032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98331 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'aura/window.h')
-rw-r--r-- | aura/window.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/aura/window.h b/aura/window.h index f72b2b6..871ceb6 100644 --- a/aura/window.h +++ b/aura/window.h @@ -10,7 +10,6 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" -#include "ui/gfx/native_widget_types.h" #include "ui/gfx/rect.h" class SkCanvas; @@ -42,14 +41,17 @@ class Window { VISIBILITY_SHOWN_NO_INPUT = 3, }; - explicit Window(Desktop* desktop); + explicit Window(WindowDelegate* delegate); ~Window(); - void set_delegate(WindowDelegate* d) { delegate_ = d; } + void Init(); int id() const { return id_; } void set_id(int id) { id_ = id; } + ui::Layer* layer() { return layer_.get(); } + const ui::Layer* layer() const { return layer_.get(); } + // Changes the visibility of the window. void SetVisibility(Visibility visibility); Visibility visibility() const { return visibility_; } @@ -64,6 +66,11 @@ class Window { // Sets the contents of the window. void SetCanvas(const SkCanvas& canvas, const gfx::Point& origin); + // Sets the parent window of the window. If NULL, the window is parented to + // the desktop's window. + void SetParent(Window* parent); + Window* parent() { return parent_; } + // Draw the window and its children. void DrawTree(); @@ -72,7 +79,6 @@ class Window { // should change this. void AddChild(Window* child); void RemoveChild(Window* child); - Window* parent() { return parent_; } // Handles a mouse event. Returns true if handled. bool OnMouseEvent(const MouseEvent& event); |