Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Side by Side Diff: content/browser/renderer_host/compositor_resize_lock_aura.h

Issue 2773433003: Fix CompositorResizeLock to do something. (Closed)
Patch Set: resizelock: observer-rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_RESIZE_LOCK_AURA_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_RESIZE_LOCK_AURA_H_
7
8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h"
10 #include "base/memory/weak_ptr.h"
11 #include "base/time/time.h"
12 #include "content/browser/renderer_host/resize_lock.h"
13
14 namespace aura {
15 class WindowTreeHost;
16 }
17 namespace ui {
18 class CompositorLock;
19 }
20
21 namespace content {
22
23 // Used to prevent further resizes while a resize is pending.
24 class CompositorResizeLock : public ResizeLock {
25 public:
26 CompositorResizeLock(aura::WindowTreeHost* host,
27 const gfx::Size new_size,
28 bool defer_compositor_lock,
29 const base::TimeDelta& timeout);
30 ~CompositorResizeLock() override;
31
32 bool GrabDeferredLock() override;
33 void UnlockCompositor() override;
34
35 protected:
36 void LockCompositor() override;
37 void CancelLock();
38
39 private:
40 aura::WindowTreeHost* host_;
41 scoped_refptr<ui::CompositorLock> compositor_lock_;
42 bool cancelled_;
43
44 base::WeakPtrFactory<CompositorResizeLock> weak_ptr_factory_;
45
46 DISALLOW_COPY_AND_ASSIGN(CompositorResizeLock);
47 };
48
49 } // namespace content
50
51 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_RESIZE_LOCK_AURA_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/compositor_resize_lock.cc ('k') | content/browser/renderer_host/compositor_resize_lock_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698