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

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

Issue 513923004: More viewmanager renaming: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sim30 Created 6 years, 4 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/ids.h ('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
deleted file mode 100644
index af140b9a8bbff4f0185496496cce3c494566133b..0000000000000000000000000000000000000000
--- a/mojo/services/view_manager/node.h
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MOJO_SERVICES_VIEW_MANAGER_NODE_H_
-#define MOJO_SERVICES_VIEW_MANAGER_NODE_H_
-
-#include <vector>
-
-#include "base/logging.h"
-#include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h"
-#include "mojo/services/view_manager/ids.h"
-#include "mojo/services/view_manager/view_manager_export.h"
-#include "third_party/skia/include/core/SkBitmap.h"
-#include "ui/gfx/geometry/rect.h"
-
-namespace mojo {
-namespace service {
-
-class NodeDelegate;
-
-// Represents a node in the graph. Delegate is informed of interesting events.
-//
-// It is assumed that all functions that mutate the node tree have validated the
-// value. For example, Reorder() assumes the supplied node is a child and not
-// already in position.
-class MOJO_VIEW_MANAGER_EXPORT Node {
- public:
- Node(NodeDelegate* delegate, const NodeId& id);
- virtual ~Node();
-
- const NodeId& id() const { return id_; }
-
- void Add(Node* child);
- void Remove(Node* child);
- void Reorder(Node* child, Node* relative, OrderDirection direction);
-
- const gfx::Rect& bounds() const { return bounds_; }
- void SetBounds(const gfx::Rect& bounds);
-
- const Node* parent() const { return parent_; }
- Node* parent() { return parent_; }
-
- const Node* GetRoot() const;
- Node* GetRoot() {
- return const_cast<Node*>(const_cast<const Node*>(this)->GetRoot());
- }
-
- std::vector<const Node*> GetChildren() const;
- std::vector<Node*> GetChildren();
-
- bool Contains(const Node* node) const;
-
- // Returns true if the window is visible. This does not consider visibility
- // of any ancestors.
- bool visible() const { return visible_; }
- void SetVisible(bool value);
-
- void SetBitmap(const SkBitmap& contents);
- const SkBitmap& bitmap() const { return bitmap_; }
-
- private:
- typedef std::vector<Node*> Nodes;
-
- // Implementation of removing a node. Doesn't send any notification.
- void RemoveImpl(Node* node);
-
- NodeDelegate* delegate_;
- const NodeId id_;
- Node* parent_;
- Nodes children_;
- bool visible_;
- gfx::Rect bounds_;
- SkBitmap bitmap_;
-
- DISALLOW_COPY_AND_ASSIGN(Node);
-};
-
-} // namespace service
-} // namespace mojo
-
-#endif // MOJO_SERVICES_VIEW_MANAGER_NODE_H_
« no previous file with comments | « mojo/services/view_manager/ids.h ('k') | mojo/services/view_manager/node.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698