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

Side by Side Diff: content/browser/aura/compositor_resize_lock.h

Issue 137893007: Add the UI compositor to the Mac build (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add missed file Created 6 years, 11 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 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_AURA_RESIZE_LOCK_AURA_H_
6 #define CONTENT_BROWSER_AURA_RESIZE_LOCK_AURA_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "base/memory/weak_ptr.h"
10 #include "base/time/time.h"
11 #include "content/browser/aura/resize_lock.h"
12
13 namespace aura { class RootWindow; }
14
15 namespace ui { class CompositorLock; }
16
17 namespace content {
18
19 // Used to prevent further resizes while a resize is pending.
20 class CompositorResizeLock : public ResizeLock {
21 public:
22 CompositorResizeLock(aura::RootWindow* root_window,
23 const gfx::Size new_size,
24 bool defer_compositor_lock,
25 const base::TimeDelta& timeout);
26 virtual ~CompositorResizeLock();
27
28 virtual bool GrabDeferredLock() OVERRIDE;
29 virtual void UnlockCompositor() OVERRIDE;
30
31 protected:
32 virtual void LockCompositor() OVERRIDE;
33 void CancelLock();
34
35 private:
36 aura::RootWindow* root_window_;
37 scoped_refptr<ui::CompositorLock> compositor_lock_;
38 base::WeakPtrFactory<CompositorResizeLock> weak_ptr_factory_;
39 bool cancelled_;
40
41 DISALLOW_COPY_AND_ASSIGN(CompositorResizeLock);
42 };
43
44 } // namespace content
45
46 #endif // CONTENT_BROWSER_AURA_RESIZE_LOCK_AURA_H_
OLDNEW
« no previous file with comments | « content/browser/aura/browser_compositor_output_surface_proxy.cc ('k') | content/browser/aura/compositor_resize_lock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698