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

Unified Diff: mojo/services/view_manager/node.h

Issue 267293004: Wires up view manager to an actual display (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 7 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 | « mojo/services/view_manager/main.cc ('k') | mojo/services/view_manager/node.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/view_manager/node.h
diff --git a/mojo/services/view_manager/node.h b/mojo/services/view_manager/node.h
index ed6887428bd19939deb88fdc39f90e6fcb71dab2..d1b65ae24fa2b175296bdc3f266567cc878e7920 100644
--- a/mojo/services/view_manager/node.h
+++ b/mojo/services/view_manager/node.h
@@ -11,6 +11,7 @@
#include "mojo/services/view_manager/ids.h"
#include "mojo/services/view_manager/view_manager_export.h"
#include "ui/aura/window.h"
+#include "ui/aura/window_delegate.h"
#include "ui/aura/window_observer.h"
namespace mojo {
@@ -21,7 +22,9 @@ class NodeDelegate;
class View;
// Represents a node in the graph. Delegate is informed of interesting events.
-class MOJO_VIEW_MANAGER_EXPORT Node : public aura::WindowObserver {
+class MOJO_VIEW_MANAGER_EXPORT Node
+ : public aura::WindowObserver,
+ public aura::WindowDelegate {
public:
Node(NodeDelegate* delegate, const NodeId& id);
virtual ~Node();
@@ -34,6 +37,8 @@ class MOJO_VIEW_MANAGER_EXPORT Node : public aura::WindowObserver {
void Add(Node* child);
void Remove(Node* child);
+ aura::Window* window() { return &window_; }
+
Node* GetParent();
std::vector<Node*> GetChildren();
@@ -47,6 +52,26 @@ class MOJO_VIEW_MANAGER_EXPORT Node : public aura::WindowObserver {
virtual void OnWindowHierarchyChanged(
const aura::WindowObserver::HierarchyChangeParams& params) OVERRIDE;
+ // WindowDelegate overrides:
+ virtual gfx::Size GetMinimumSize() const OVERRIDE;
+ virtual gfx::Size GetMaximumSize() const OVERRIDE;
+ virtual void OnBoundsChanged(const gfx::Rect& old_bounds,
+ const gfx::Rect& new_bounds) OVERRIDE;
+ virtual gfx::NativeCursor GetCursor(const gfx::Point& point) OVERRIDE;
+ virtual int GetNonClientComponent(const gfx::Point& point) const OVERRIDE;
+ virtual bool ShouldDescendIntoChildForEventHandling(
+ aura::Window* child,
+ const gfx::Point& location) OVERRIDE;
+ virtual bool CanFocus() OVERRIDE;
+ virtual void OnCaptureLost() OVERRIDE;
+ virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+ virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE;
+ virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
+ virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE;
+ virtual void OnWindowTargetVisibilityChanged(bool visible) OVERRIDE;
+ virtual bool HasHitTestMask() const OVERRIDE;
+ virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE;
+
NodeDelegate* delegate_;
const NodeId id_;
« no previous file with comments | « mojo/services/view_manager/main.cc ('k') | mojo/services/view_manager/node.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698