| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_EXO_SURFACE_H_ | 5 #ifndef COMPONENTS_EXO_SURFACE_H_ |
| 6 #define COMPONENTS_EXO_SURFACE_H_ | 6 #define COMPONENTS_EXO_SURFACE_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 // Returns true if surface has been assigned a surface delegate. | 116 // Returns true if surface has been assigned a surface delegate. |
| 117 bool HasSurfaceDelegate() const; | 117 bool HasSurfaceDelegate() const; |
| 118 | 118 |
| 119 // Surface does not own observers. It is the responsibility of the observer | 119 // Surface does not own observers. It is the responsibility of the observer |
| 120 // to remove itself when it is done observing. | 120 // to remove itself when it is done observing. |
| 121 void AddSurfaceObserver(SurfaceObserver* observer); | 121 void AddSurfaceObserver(SurfaceObserver* observer); |
| 122 void RemoveSurfaceObserver(SurfaceObserver* observer); | 122 void RemoveSurfaceObserver(SurfaceObserver* observer); |
| 123 bool HasSurfaceObserver(const SurfaceObserver* observer) const; | 123 bool HasSurfaceObserver(const SurfaceObserver* observer) const; |
| 124 | 124 |
| 125 // Returns a trace value representing the state of the surface. | 125 // Returns a trace value representing the state of the surface. |
| 126 scoped_refptr<base::trace_event::TracedValue> AsTracedValue() const; | 126 scoped_ptr<base::trace_event::TracedValue> AsTracedValue() const; |
| 127 | 127 |
| 128 bool HasPendingDamageForTesting(const gfx::Rect& damage) const { | 128 bool HasPendingDamageForTesting(const gfx::Rect& damage) const { |
| 129 return pending_damage_.contains(gfx::RectToSkIRect(damage)); | 129 return pending_damage_.contains(gfx::RectToSkIRect(damage)); |
| 130 } | 130 } |
| 131 | 131 |
| 132 // Overridden from aura::WindowObserver: | 132 // Overridden from aura::WindowObserver: |
| 133 void OnWindowAddedToRootWindow(aura::Window* window) override; | 133 void OnWindowAddedToRootWindow(aura::Window* window) override; |
| 134 void OnWindowRemovingFromRootWindow(aura::Window* window, | 134 void OnWindowRemovingFromRootWindow(aura::Window* window, |
| 135 aura::Window* new_root) override; | 135 aura::Window* new_root) override; |
| 136 | 136 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 | 218 |
| 219 // Surface observer list. Surface does not own the observers. | 219 // Surface observer list. Surface does not own the observers. |
| 220 base::ObserverList<SurfaceObserver, true> observers_; | 220 base::ObserverList<SurfaceObserver, true> observers_; |
| 221 | 221 |
| 222 DISALLOW_COPY_AND_ASSIGN(Surface); | 222 DISALLOW_COPY_AND_ASSIGN(Surface); |
| 223 }; | 223 }; |
| 224 | 224 |
| 225 } // namespace exo | 225 } // namespace exo |
| 226 | 226 |
| 227 #endif // COMPONENTS_EXO_SURFACE_H_ | 227 #endif // COMPONENTS_EXO_SURFACE_H_ |
| OLD | NEW |