| Index: mojo/services/view_manager/node.cc
|
| diff --git a/mojo/services/view_manager/node.cc b/mojo/services/view_manager/node.cc
|
| index 5f5af519c98379890f9c23ed5fa68803c80559fa..e2436dab5aeb96d5f46149465355e37299d2ac54 100644
|
| --- a/mojo/services/view_manager/node.cc
|
| +++ b/mojo/services/view_manager/node.cc
|
| @@ -7,11 +7,6 @@
|
| #include "mojo/services/view_manager/node_delegate.h"
|
| #include "mojo/services/view_manager/view.h"
|
| #include "ui/aura/window_property.h"
|
| -#include "ui/base/cursor/cursor.h"
|
| -#include "ui/base/hit_test.h"
|
| -#include "ui/gfx/canvas.h"
|
| -#include "ui/gfx/image/image_skia.h"
|
| -#include "ui/gfx/native_widget_types.h"
|
|
|
| DECLARE_WINDOW_PROPERTY_TYPE(mojo::services::view_manager::Node*);
|
|
|
| @@ -25,15 +20,11 @@
|
| : delegate_(delegate),
|
| id_(id),
|
| view_(NULL),
|
| - window_(this) {
|
| + window_(NULL) {
|
| DCHECK(delegate); // Must provide a delegate.
|
| window_.set_owned_by_parent(false);
|
| window_.AddObserver(this);
|
| window_.SetProperty(kNodeKey, this);
|
| - window_.Init(aura::WINDOW_LAYER_TEXTURED);
|
| -
|
| - // TODO(sky): this likely needs to be false and add a visibility API.
|
| - window_.Show();
|
| }
|
|
|
| Node::~Node() {
|
| @@ -89,71 +80,12 @@
|
| if (params.target != &window_ || params.receiver != &window_)
|
| return;
|
| NodeId new_parent_id;
|
| - if (params.new_parent && params.new_parent->GetProperty(kNodeKey))
|
| + if (params.new_parent)
|
| new_parent_id = params.new_parent->GetProperty(kNodeKey)->id();
|
| NodeId old_parent_id;
|
| - if (params.old_parent && params.old_parent->GetProperty(kNodeKey))
|
| + if (params.old_parent)
|
| old_parent_id = params.old_parent->GetProperty(kNodeKey)->id();
|
| delegate_->OnNodeHierarchyChanged(id_, new_parent_id, old_parent_id);
|
| -}
|
| -
|
| -gfx::Size Node::GetMinimumSize() const {
|
| - return gfx::Size();
|
| -}
|
| -
|
| -gfx::Size Node::GetMaximumSize() const {
|
| - return gfx::Size();
|
| -}
|
| -
|
| -void Node::OnBoundsChanged(const gfx::Rect& old_bounds,
|
| - const gfx::Rect& new_bounds) {
|
| -}
|
| -
|
| -gfx::NativeCursor Node::GetCursor(const gfx::Point& point) {
|
| - return gfx::kNullCursor;
|
| -}
|
| -
|
| -int Node::GetNonClientComponent(const gfx::Point& point) const {
|
| - return HTCAPTION;
|
| -}
|
| -
|
| -bool Node::ShouldDescendIntoChildForEventHandling(
|
| - aura::Window* child,
|
| - const gfx::Point& location) {
|
| - return true;
|
| -}
|
| -
|
| -bool Node::CanFocus() {
|
| - return true;
|
| -}
|
| -
|
| -void Node::OnCaptureLost() {
|
| -}
|
| -
|
| -void Node::OnPaint(gfx::Canvas* canvas) {
|
| - if (view_) {
|
| - canvas->DrawImageInt(
|
| - gfx::ImageSkia::CreateFrom1xBitmap(view_->bitmap()), 0, 0);
|
| - }
|
| -}
|
| -
|
| -void Node::OnDeviceScaleFactorChanged(float device_scale_factor) {
|
| -}
|
| -
|
| -void Node::OnWindowDestroying(aura::Window* window) {
|
| -}
|
| -
|
| -void Node::OnWindowDestroyed(aura::Window* window) {
|
| -}
|
| -
|
| -void Node::OnWindowTargetVisibilityChanged(bool visible) {
|
| -}
|
| -
|
| -bool Node::HasHitTestMask() const {
|
| - return false;
|
| -}
|
| -
|
| -void Node::GetHitTestMask(gfx::Path* mask) const {
|
| }
|
|
|
| } // namespace view_manager
|
|
|