layer_tree_owner.h revision a1401311d1ab56c4ed0a474bd38c108f75cb0cd9
1// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef UI_COMPOSITOR_LAYER_TREE_OWNER_H_
6#define UI_COMPOSITOR_LAYER_TREE_OWNER_H_
7
8#include "base/basictypes.h"
9#include "ui/compositor/compositor_export.h"
10
11namespace ui {
12
13class Layer;
14
15// Scoping object that owns a Layer and all its descendants.
16class COMPOSITOR_EXPORT LayerTreeOwner {
17 public:
18  explicit LayerTreeOwner(Layer* root);
19  ~LayerTreeOwner();
20
21  Layer* root() { return root_; }
22  const Layer* root() const { return root_; }
23
24 private:
25  Layer* root_;
26
27  DISALLOW_COPY_AND_ASSIGN(LayerTreeOwner);
28};
29
30}  // namespace
31
32#endif  // UI_COMPOSITOR_LAYER_TREE_OWNER_H_
33