blob: eca0c707d116af8c85c4b8f6cb4bcef9050b3008 [file] [log] [blame]
[email protected]c797cd42011-03-15 02:18:361// Copyright (c) 2011 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
[email protected]7c060932011-03-23 15:49:105#include "ui/gfx/compositor/compositor.h"
[email protected]a8f21152011-09-08 15:30:026#include "ui/gfx/compositor/compositor_observer.h"
[email protected]c797cd42011-03-15 02:18:367
8namespace ui {
9
[email protected]82a01ac2011-09-08 16:00:1810Compositor::Compositor(CompositorDelegate* delegate, const gfx::Size& size)
11 : delegate_(delegate),
12 size_(size) {
13}
14
15Compositor::~Compositor() {
16}
17
[email protected]a8f21152011-09-08 15:30:0218void Compositor::NotifyStart() {
19 OnNotifyStart();
[email protected]c797cd42011-03-15 02:18:3620}
21
[email protected]a8f21152011-09-08 15:30:0222void Compositor::NotifyEnd() {
23 OnNotifyEnd();
24 FOR_EACH_OBSERVER(CompositorObserver,
25 observer_list_,
26 OnCompositingEnded());
27}
28
29void Compositor::AddObserver(CompositorObserver* observer) {
30 observer_list_.AddObserver(observer);
31}
32
33void Compositor::RemoveObserver(CompositorObserver* observer) {
34 observer_list_.RemoveObserver(observer);
35}
36
37
[email protected]c797cd42011-03-15 02:18:3638} // namespace ui