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

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

Issue 2790623003: ui: Rework CompositorResizeLock interaction with DelegatedFrameHost (Closed)
Patch Set: shouldskip: allowskipafterframe 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
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_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_RESIZE_LOCK_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_RESIZE_LOCK_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_RESIZE_LOCK_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 28 matching lines...) Expand all
39 39
40 // Returns |true| if the call locks the compositor, or false if it was ever 40 // Returns |true| if the call locks the compositor, or false if it was ever
41 // locked/unlocked. 41 // locked/unlocked.
42 bool Lock(); 42 bool Lock();
43 43
44 // Releases the lock on the compositor without releasing the whole resize 44 // Releases the lock on the compositor without releasing the whole resize
45 // lock. The client is not told about this. If called before locking, it will 45 // lock. The client is not told about this. If called before locking, it will
46 // prevent locking from happening. 46 // prevent locking from happening.
47 void UnlockCompositor(); 47 void UnlockCompositor();
48 48
49 bool timed_out() const { return timed_out_; }
50
49 const gfx::Size& expected_size() const { return expected_size_; } 51 const gfx::Size& expected_size() const { return expected_size_; }
50 52
51 private: 53 private:
52 // ui::CompositorLockClient implementation. 54 // ui::CompositorLockClient implementation.
53 void CompositorLockTimedOut() override; 55 void CompositorLockTimedOut() override;
54 56
55 CompositorResizeLockClient* client_; 57 CompositorResizeLockClient* client_;
56 const gfx::Size expected_size_; 58 const gfx::Size expected_size_;
57 std::unique_ptr<ui::CompositorLock> compositor_lock_; 59 std::unique_ptr<ui::CompositorLock> compositor_lock_;
58 bool unlocked_ = false; 60 bool unlocked_ = false;
61 bool timed_out_ = false;
59 62
60 DISALLOW_COPY_AND_ASSIGN(CompositorResizeLock); 63 DISALLOW_COPY_AND_ASSIGN(CompositorResizeLock);
61 }; 64 };
62 65
63 } // namespace content 66 } // namespace content
64 67
65 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_RESIZE_LOCK_AURA_H_ 68 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_RESIZE_LOCK_AURA_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/browser_compositor_view_mac.mm ('k') | content/browser/renderer_host/compositor_resize_lock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698