| 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" | |
| 9 #include "base/time/time.h" | 8 #include "base/time/time.h" |
| 10 #include "ui/compositor/compositor_export.h" | 9 #include "ui/compositor/compositor_export.h" |
| 11 | 10 |
| 12 namespace ui { | 11 namespace ui { |
| 13 | 12 |
| 14 class Compositor; | 13 class Compositor; |
| 15 | 14 |
| 16 // A compositor observer is notified when compositing completes. | 15 // A compositor observer is notified when compositing completes. |
| 17 class COMPOSITOR_EXPORT CompositorObserver { | 16 class COMPOSITOR_EXPORT CompositorObserver { |
| 18 public: | 17 public: |
| (...skipping 16 matching lines...) Expand all Loading... |
| 35 // Called when compositing completes: the present to screen has completed. | 34 // Called when compositing completes: the present to screen has completed. |
| 36 virtual void OnCompositingEnded(Compositor* compositor) = 0; | 35 virtual void OnCompositingEnded(Compositor* compositor) = 0; |
| 37 | 36 |
| 38 // Called when compositing is aborted (e.g. lost graphics context). | 37 // Called when compositing is aborted (e.g. lost graphics context). |
| 39 virtual void OnCompositingAborted(Compositor* compositor) = 0; | 38 virtual void OnCompositingAborted(Compositor* compositor) = 0; |
| 40 | 39 |
| 41 // Called when the compositor lock state changes. | 40 // Called when the compositor lock state changes. |
| 42 virtual void OnCompositingLockStateChanged(Compositor* compositor) = 0; | 41 virtual void OnCompositingLockStateChanged(Compositor* compositor) = 0; |
| 43 | 42 |
| 44 protected: | 43 protected: |
| 45 #if DCHECK_IS_ON | 44 #if defined(OS_MACOSX) |
| 45 // Debugging instrumentation for crbug.com/401630. |
| 46 // TODO(ccameron): remove this. |
| 46 friend class Compositor; | 47 friend class Compositor; |
| 47 int32 observing_count_; | 48 int32 observing_count_; |
| 48 #endif | 49 #endif |
| 49 | 50 |
| 50 virtual ~CompositorObserver(); | 51 virtual ~CompositorObserver(); |
| 51 }; | 52 }; |
| 52 | 53 |
| 53 } // namespace ui | 54 } // namespace ui |
| 54 | 55 |
| 55 #endif // UI_COMPOSITOR_COMPOSITOR_OBSERVER_H_ | 56 #endif // UI_COMPOSITOR_COMPOSITOR_OBSERVER_H_ |
| OLD | NEW |