OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_RESIZE_LOCK_AURA_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_RESIZE_LOCK_AURA_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_RESIZE_LOCK_AURA_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_RESIZE_LOCK_AURA_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 // Used to prevent further resizes while a resize is pending. | 22 // Used to prevent further resizes while a resize is pending. |
23 class CompositorResizeLock : public ResizeLock { | 23 class CompositorResizeLock : public ResizeLock { |
24 public: | 24 public: |
25 CompositorResizeLock(aura::WindowTreeHost* host, | 25 CompositorResizeLock(aura::WindowTreeHost* host, |
26 const gfx::Size new_size, | 26 const gfx::Size new_size, |
27 bool defer_compositor_lock, | 27 bool defer_compositor_lock, |
28 const base::TimeDelta& timeout); | 28 const base::TimeDelta& timeout); |
29 virtual ~CompositorResizeLock(); | 29 virtual ~CompositorResizeLock(); |
30 | 30 |
31 virtual bool GrabDeferredLock() OVERRIDE; | 31 virtual bool GrabDeferredLock() override; |
32 virtual void UnlockCompositor() OVERRIDE; | 32 virtual void UnlockCompositor() override; |
33 | 33 |
34 protected: | 34 protected: |
35 virtual void LockCompositor() OVERRIDE; | 35 virtual void LockCompositor() override; |
36 void CancelLock(); | 36 void CancelLock(); |
37 | 37 |
38 private: | 38 private: |
39 aura::WindowTreeHost* host_; | 39 aura::WindowTreeHost* host_; |
40 scoped_refptr<ui::CompositorLock> compositor_lock_; | 40 scoped_refptr<ui::CompositorLock> compositor_lock_; |
41 bool cancelled_; | 41 bool cancelled_; |
42 | 42 |
43 base::WeakPtrFactory<CompositorResizeLock> weak_ptr_factory_; | 43 base::WeakPtrFactory<CompositorResizeLock> weak_ptr_factory_; |
44 | 44 |
45 DISALLOW_COPY_AND_ASSIGN(CompositorResizeLock); | 45 DISALLOW_COPY_AND_ASSIGN(CompositorResizeLock); |
46 }; | 46 }; |
47 | 47 |
48 } // namespace content | 48 } // namespace content |
49 | 49 |
50 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_RESIZE_LOCK_AURA_H_ | 50 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_RESIZE_LOCK_AURA_H_ |
OLD | NEW |