OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_COMPOSITOR_COMPOSITOR_OBSERVER_H_ | 5 #ifndef UI_COMPOSITOR_COMPOSITOR_OBSERVER_H_ |
6 #define UI_COMPOSITOR_COMPOSITOR_OBSERVER_H_ | 6 #define UI_COMPOSITOR_COMPOSITOR_OBSERVER_H_ |
7 | 7 |
| 8 #include "base/logging.h" |
8 #include "base/time/time.h" | 9 #include "base/time/time.h" |
9 #include "ui/compositor/compositor_export.h" | 10 #include "ui/compositor/compositor_export.h" |
10 | 11 |
11 namespace ui { | 12 namespace ui { |
12 | 13 |
13 class Compositor; | 14 class Compositor; |
14 | 15 |
15 // A compositor observer is notified when compositing completes. | 16 // A compositor observer is notified when compositing completes. |
16 class COMPOSITOR_EXPORT CompositorObserver { | 17 class COMPOSITOR_EXPORT CompositorObserver { |
17 public: | 18 public: |
(...skipping 16 matching lines...) Expand all Loading... |
34 // Called when compositing completes: the present to screen has completed. | 35 // Called when compositing completes: the present to screen has completed. |
35 virtual void OnCompositingEnded(Compositor* compositor) = 0; | 36 virtual void OnCompositingEnded(Compositor* compositor) = 0; |
36 | 37 |
37 // Called when compositing is aborted (e.g. lost graphics context). | 38 // Called when compositing is aborted (e.g. lost graphics context). |
38 virtual void OnCompositingAborted(Compositor* compositor) = 0; | 39 virtual void OnCompositingAborted(Compositor* compositor) = 0; |
39 | 40 |
40 // Called when the compositor lock state changes. | 41 // Called when the compositor lock state changes. |
41 virtual void OnCompositingLockStateChanged(Compositor* compositor) = 0; | 42 virtual void OnCompositingLockStateChanged(Compositor* compositor) = 0; |
42 | 43 |
43 protected: | 44 protected: |
44 #if defined(OS_MACOSX) | 45 #if DCHECK_IS_ON |
45 // Debugging instrumentation for crbug.com/401630. | |
46 // TODO(ccameron): remove this. | |
47 friend class Compositor; | 46 friend class Compositor; |
48 int32 observing_count_; | 47 int32 observing_count_; |
49 #endif | 48 #endif |
50 | 49 |
51 virtual ~CompositorObserver(); | 50 virtual ~CompositorObserver(); |
52 }; | 51 }; |
53 | 52 |
54 } // namespace ui | 53 } // namespace ui |
55 | 54 |
56 #endif // UI_COMPOSITOR_COMPOSITOR_OBSERVER_H_ | 55 #endif // UI_COMPOSITOR_COMPOSITOR_OBSERVER_H_ |
OLD | NEW |