| 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_SUB_SURFACE_H_ | 5 #ifndef COMPONENTS_EXO_SUB_SURFACE_H_ |
| 6 #define COMPONENTS_EXO_SUB_SURFACE_H_ | 6 #define COMPONENTS_EXO_SUB_SURFACE_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "components/exo/surface_delegate.h" | 10 #include "components/exo/surface_delegate.h" |
| 11 #include "components/exo/surface_observer.h" | 11 #include "components/exo/surface_observer.h" |
| 12 #include "ui/gfx/geometry/point.h" | 12 #include "ui/gfx/geometry/point.h" |
| 13 | 13 |
| 14 namespace base { | 14 namespace base { |
| 15 namespace trace_event { | 15 namespace trace_event { |
| 16 class TracedValue; | 16 class TracedValue; |
| 17 } | 17 } |
| 18 } | 18 } |
| 19 | 19 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 38 void PlaceAbove(Surface* reference); | 38 void PlaceAbove(Surface* reference); |
| 39 | 39 |
| 40 // This removes sub-surface from the stack, and puts it back just below the | 40 // This removes sub-surface from the stack, and puts it back just below the |
| 41 // sibling surface. | 41 // sibling surface. |
| 42 void PlaceBelow(Surface* sibiling); | 42 void PlaceBelow(Surface* sibiling); |
| 43 | 43 |
| 44 // Change the commit behaviour of the sub-surface. | 44 // Change the commit behaviour of the sub-surface. |
| 45 void SetCommitBehavior(bool synchronized); | 45 void SetCommitBehavior(bool synchronized); |
| 46 | 46 |
| 47 // Returns a trace value representing the state of the surface. | 47 // Returns a trace value representing the state of the surface. |
| 48 scoped_refptr<base::trace_event::TracedValue> AsTracedValue() const; | 48 scoped_ptr<base::trace_event::TracedValue> AsTracedValue() const; |
| 49 | 49 |
| 50 // Overridden from SurfaceDelegate: | 50 // Overridden from SurfaceDelegate: |
| 51 void OnSurfaceCommit() override; | 51 void OnSurfaceCommit() override; |
| 52 bool IsSurfaceSynchronized() const override; | 52 bool IsSurfaceSynchronized() const override; |
| 53 | 53 |
| 54 // Overridden from SurfaceObserver: | 54 // Overridden from SurfaceObserver: |
| 55 void OnSurfaceDestroying(Surface* surface) override; | 55 void OnSurfaceDestroying(Surface* surface) override; |
| 56 | 56 |
| 57 private: | 57 private: |
| 58 Surface* surface_; | 58 Surface* surface_; |
| 59 Surface* parent_; | 59 Surface* parent_; |
| 60 bool is_synchronized_; | 60 bool is_synchronized_; |
| 61 | 61 |
| 62 DISALLOW_COPY_AND_ASSIGN(SubSurface); | 62 DISALLOW_COPY_AND_ASSIGN(SubSurface); |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 } // namespace exo | 65 } // namespace exo |
| 66 | 66 |
| 67 #endif // COMPONENTS_EXO_SUB_SURFACE_H_ | 67 #endif // COMPONENTS_EXO_SUB_SURFACE_H_ |
| OLD | NEW |