| 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_AURA_ROOT_WINDOW_H_ | 5 #ifndef UI_AURA_ROOT_WINDOW_H_ |
| 6 #define UI_AURA_ROOT_WINDOW_H_ | 6 #define UI_AURA_ROOT_WINDOW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 // event. The typical use case is when waiting for a renderer to produce a frame | 53 // event. The typical use case is when waiting for a renderer to produce a frame |
| 54 // at the right size. The caller keeps a reference on this object, and drops the | 54 // at the right size. The caller keeps a reference on this object, and drops the |
| 55 // reference once it desires to release the lock. | 55 // reference once it desires to release the lock. |
| 56 // Note however that the lock is canceled after a short timeout to ensure | 56 // Note however that the lock is canceled after a short timeout to ensure |
| 57 // responsiveness of the UI, so the compositor tree should be kept in a | 57 // responsiveness of the UI, so the compositor tree should be kept in a |
| 58 // "reasonable" state while the lock is held. | 58 // "reasonable" state while the lock is held. |
| 59 // Don't instantiate this class directly, use RootWindow::GetCompositorLock. | 59 // Don't instantiate this class directly, use RootWindow::GetCompositorLock. |
| 60 class AURA_EXPORT CompositorLock : | 60 class AURA_EXPORT CompositorLock : |
| 61 public base::RefCounted<CompositorLock>, | 61 public base::RefCounted<CompositorLock>, |
| 62 public base::SupportsWeakPtr<CompositorLock> { | 62 public base::SupportsWeakPtr<CompositorLock> { |
| 63 public: | |
| 64 ~CompositorLock(); | |
| 65 | |
| 66 private: | 63 private: |
| 64 friend class base::RefCounted<CompositorLock>; |
| 67 friend class RootWindow; | 65 friend class RootWindow; |
| 68 | 66 |
| 69 CompositorLock(RootWindow* root_window); | 67 CompositorLock(RootWindow* root_window); |
| 68 ~CompositorLock(); |
| 69 |
| 70 void CancelLock(); | 70 void CancelLock(); |
| 71 | 71 |
| 72 RootWindow* root_window_; | 72 RootWindow* root_window_; |
| 73 DISALLOW_COPY_AND_ASSIGN(CompositorLock); | 73 DISALLOW_COPY_AND_ASSIGN(CompositorLock); |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 // RootWindow is responsible for hosting a set of windows. | 76 // RootWindow is responsible for hosting a set of windows. |
| 77 class AURA_EXPORT RootWindow : public ui::CompositorDelegate, | 77 class AURA_EXPORT RootWindow : public ui::CompositorDelegate, |
| 78 public ui::CompositorObserver, | 78 public ui::CompositorObserver, |
| 79 public Window, | 79 public Window, |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 | 398 |
| 399 CompositorLock* compositor_lock_; | 399 CompositorLock* compositor_lock_; |
| 400 bool draw_on_compositor_unlock_; | 400 bool draw_on_compositor_unlock_; |
| 401 | 401 |
| 402 DISALLOW_COPY_AND_ASSIGN(RootWindow); | 402 DISALLOW_COPY_AND_ASSIGN(RootWindow); |
| 403 }; | 403 }; |
| 404 | 404 |
| 405 } // namespace aura | 405 } // namespace aura |
| 406 | 406 |
| 407 #endif // UI_AURA_ROOT_WINDOW_H_ | 407 #endif // UI_AURA_ROOT_WINDOW_H_ |
| OLD | NEW |