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

Unified Diff: ui/aura/window.h

Issue 2446893005: Adds a porting layer so aura can be made to work with mus (Closed)
Patch Set: better Created 4 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/env.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
diff --git a/ui/aura/window.h b/ui/aura/window.h
index f27c2be65f04686235c7204dd1d4c549c560fd45..2592c320a4317faf991d1acc85062b9dc354974b 100644
--- a/ui/aura/window.h
+++ b/ui/aura/window.h
@@ -9,6 +9,7 @@
#include <map>
#include <memory>
+#include <set>
#include <string>
#include <vector>
@@ -50,6 +51,7 @@ namespace aura {
class LayoutManager;
class WindowDelegate;
+class WindowPort;
class WindowObserver;
class WindowTreeHost;
@@ -85,6 +87,7 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
typedef std::vector<Window*> Windows;
explicit Window(WindowDelegate* delegate);
+ Window(WindowDelegate* delegate, std::unique_ptr<WindowPort> port);
~Window() override;
// Initializes the window. This creates the window's layer.
@@ -313,6 +316,9 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
template<typename T>
void ClearProperty(const WindowProperty<T>* property);
+ // Returns the value of all properties with a non-default value.
+ std::set<const void*> GetAllPropertKeys() const;
+
// NativeWidget::[GS]etNativeWindowProperty use strings as keys, and this is
// difficult to change while retaining compatibility with other platforms.
// TODO(benrg): Find a better solution.
@@ -340,10 +346,12 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
void RemoveOrDestroyChildren();
private:
- friend class test::WindowTestApi;
friend class LayoutManager;
+ friend class WindowPort;
friend class WindowTargeter;
friend class subtle::PropertyHelper;
+ friend class test::WindowTestApi;
+
// Called by the public {Set,Get,Clear}Property functions.
int64_t SetPropertyInternal(const void* key,
const char* name,
@@ -460,6 +468,13 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
// Updates the layer name based on the window's name and id.
void UpdateLayerName();
+ // Window owns its corresponding WindowPort, but the ref is held as a raw
+ // pointer in |port_| so that it can still be accessed during destruction.
+ // This is important as deleting the WindowPort may result in trying to lookup
+ // the WindowPort associated with the Window.
+ std::unique_ptr<WindowPort> port_owner_;
+ WindowPort* port_;
+
// Bounds of this window relative to the parent. This is cached as the bounds
// of the Layer and Window are not necessarily the same. In particular bounds
// of the Layer are relative to the first ancestor with a Layer, where as this
« no previous file with comments | « ui/aura/env.cc ('k') | ui/aura/window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698