| Index: ui/gfx/compositor/layer.cc
|
| diff --git a/ui/gfx/compositor/layer.cc b/ui/gfx/compositor/layer.cc
|
| index 4f1ed24116ddf018cbb063be3a3d1d96eb190494..897c011ec3f05bd64712e7d9d8adda232749751e 100644
|
| --- a/ui/gfx/compositor/layer.cc
|
| +++ b/ui/gfx/compositor/layer.cc
|
| @@ -7,6 +7,7 @@
|
| #include <algorithm>
|
|
|
| #include "base/logging.h"
|
| +#include "ui/gfx/compositor/layer_observer.h"
|
| #include "ui/gfx/point3.h"
|
|
|
| namespace ui {
|
| @@ -108,6 +109,14 @@ void Layer::SetCanvas(const SkCanvas& canvas, const gfx::Point& origin) {
|
| texture_->SetCanvas(canvas, origin, bounds_.size());
|
| }
|
|
|
| +void Layer::AddObserver(LayerObserver* observer) {
|
| + observer_list_.AddObserver(observer);
|
| +}
|
| +
|
| +void Layer::RemoveObserver(LayerObserver* observer) {
|
| + observer_list_.RemoveObserver(observer);
|
| +}
|
| +
|
| void Layer::Draw() {
|
| ui::TextureDrawParams texture_draw_params;
|
| for (Layer* layer = this; layer; layer = layer->parent_) {
|
| @@ -152,6 +161,7 @@ void Layer::Draw() {
|
| bounds_.width(),
|
| bounds_.height() - hole_rect_.bottom()));
|
| #endif
|
| + FOR_EACH_OBSERVER(LayerObserver, observer_list_, OnDraw(this));
|
| }
|
|
|
| void Layer::DrawRegion(const ui::TextureDrawParams& params,
|
|
|