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

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

Issue 184983005: Remove Views dependency from window_animations.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 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 | Annotate | Revision Log
« no previous file with comments | « ui/compositor/layer_owner.h ('k') | ui/views/corewm/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "ui/compositor/layer_owner.h" 5 #include "ui/compositor/layer_owner.h"
6 6
7 namespace ui { 7 namespace ui {
8 8
9 LayerOwner::LayerOwner() 9 LayerOwner::LayerOwner() : layer_(NULL) {
10 : layer_(NULL) {
11 } 10 }
12 11
13 LayerOwner::~LayerOwner() { 12 LayerOwner::~LayerOwner() {
14 } 13 }
15 14
15 void LayerOwner::SetLayer(Layer* layer) {
16 DCHECK(!OwnsLayer());
17 layer_owner_.reset(layer);
18 layer_ = layer;
19 layer_->owner_ = this;
20 }
21
16 Layer* LayerOwner::AcquireLayer() { 22 Layer* LayerOwner::AcquireLayer() {
17 return layer_owner_.release(); 23 return layer_owner_.release();
18 } 24 }
19 25
26 void LayerOwner::DestroyLayer() {
27 layer_ = NULL;
28 layer_owner_.reset();
29 }
30
31 bool LayerOwner::OwnsLayer() const {
32 return !!layer_owner_;
33 }
34
20 } // namespace ui 35 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/layer_owner.h ('k') | ui/views/corewm/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698