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

Side by Side Diff: ui/compositor/compositor_lock.cc

Issue 2773433003: Fix CompositorResizeLock to do something. (Closed)
Patch Set: resizelock: outlivescompositorandtimeoutbleeding Created 3 years, 9 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 2017 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 #include "ui/compositor/compositor_lock.h"
6
7 namespace ui {
8
9 CompositorLock::CompositorLock(CompositorLockClient* client,
10 base::WeakPtr<CompositorLockDelegate> delegate)
11 : client_(client), delegate_(std::move(delegate)) {}
12
13 CompositorLock::~CompositorLock() {
14 if (delegate_)
15 delegate_->RemoveCompositorLock(this);
16 }
17
18 void CompositorLock::TimeoutLock() {
19 delegate_->RemoveCompositorLock(this);
20 delegate_ = nullptr;
21 if (client_)
22 client_->CompositorLockTimedOut();
23 }
24
25 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698