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

Unified Diff: ui/aura/window_tree_host.h

Issue 184903003: Window ownership -> WindowTreeHost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 10 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/window_targeter.cc ('k') | ui/aura/window_tree_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window_tree_host.h
diff --git a/ui/aura/window_tree_host.h b/ui/aura/window_tree_host.h
index 6418791603146e406d1aeaf388b9c5b1e880a813..71e990e76c7524c35e821880fce49bc36c2360cb 100644
--- a/ui/aura/window_tree_host.h
+++ b/ui/aura/window_tree_host.h
@@ -23,6 +23,7 @@ class Transform;
namespace ui {
class Compositor;
+class ViewProp;
}
namespace aura {
@@ -40,13 +41,16 @@ class AURA_EXPORT WindowTreeHost {
// Creates a new WindowTreeHost. The caller owns the returned value.
static WindowTreeHost* Create(const gfx::Rect& bounds);
+ // Returns the WindowTreeHost for the specified accelerated widget, or NULL
+ // if there is none associated.
+ static WindowTreeHost* GetForAcceleratedWidget(gfx::AcceleratedWidget widget);
+
void InitHost();
void InitCompositor();
- // TODO(beng): these will become trivial accessors in a future CL.
- Window* window();
- const Window* window() const;
+ Window* window() { return window_; }
+ const Window* window() const { return window_; }
WindowEventDispatcher* dispatcher() {
return const_cast<WindowEventDispatcher*>(
@@ -193,6 +197,12 @@ class AURA_EXPORT WindowTreeHost {
void MoveCursorToInternal(const gfx::Point& root_location,
const gfx::Point& host_location);
+ // We don't use a scoped_ptr for |window_| since we need this ptr to be valid
+ // during its deletion. (Window's dtor notifies observers that may attempt to
+ // reach back up to access this object which will be valid until the end of
+ // the dtor).
+ Window* window_; // Owning.
+
scoped_ptr<WindowEventDispatcher> dispatcher_;
scoped_ptr<ui::Compositor> compositor_;
@@ -202,6 +212,8 @@ class AURA_EXPORT WindowTreeHost {
// Last cursor set. Used for testing.
gfx::NativeCursor last_cursor_;
+ scoped_ptr<ui::ViewProp> prop_;
+
DISALLOW_COPY_AND_ASSIGN(WindowTreeHost);
};
« no previous file with comments | « ui/aura/window_targeter.cc ('k') | ui/aura/window_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698