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

Side by Side Diff: public/platform/WebLayer.h

Issue 23834010: Change WebLayer::addAnimation to transfer ownership of WebAnimation. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Pass ownership of WebAnimation under ANIMATION_OWNERSHIP_NOT_TRANSFER guard. Created 7 years, 2 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 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 // Provides a bitfield that describe why this composited layer was created. 130 // Provides a bitfield that describe why this composited layer was created.
131 virtual void setCompositingReasons(WebCompositingReasons) = 0; 131 virtual void setCompositingReasons(WebCompositingReasons) = 0;
132 132
133 // An animation delegate is notified when animations are started and 133 // An animation delegate is notified when animations are started and
134 // stopped. The WebLayer does not take ownership of the delegate, and it is 134 // stopped. The WebLayer does not take ownership of the delegate, and it is
135 // the responsibility of the client to reset the layer's delegate before 135 // the responsibility of the client to reset the layer's delegate before
136 // deleting the delegate. 136 // deleting the delegate.
137 virtual void setAnimationDelegate(WebAnimationDelegate*) = 0; 137 virtual void setAnimationDelegate(WebAnimationDelegate*) = 0;
138 138
139 // TODO(dshwang): temporary macro to change addAnimation() in both Blink and Chromium.
140 #define ANIMATION_OWNERSHIP_NOT_TRANSFER
141
139 // Returns false if the animation cannot be added. 142 // Returns false if the animation cannot be added.
143 // It passes ownership of WebAnimation to Chromium.
144 // NOTE: Chromium owns the WebAnimation pointer.
140 virtual bool addAnimation(WebAnimation*) = 0; 145 virtual bool addAnimation(WebAnimation*) = 0;
141 146
142 // Removes all animations with the given id. 147 // Removes all animations with the given id.
143 virtual void removeAnimation(int animationId) = 0; 148 virtual void removeAnimation(int animationId) = 0;
144 149
145 // Removes all animations with the given id targeting the given property. 150 // Removes all animations with the given id targeting the given property.
146 virtual void removeAnimation(int animationId, WebAnimation::TargetProperty) = 0; 151 virtual void removeAnimation(int animationId, WebAnimation::TargetProperty) = 0;
147 152
148 // Pauses all animations with the given id. 153 // Pauses all animations with the given id.
149 virtual void pauseAnimation(int animationId, double timeOffset) = 0; 154 virtual void pauseAnimation(int animationId, double timeOffset) = 0;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 214
210 // True if the layer is not part of a tree attached to a WebLayerTreeView. 215 // True if the layer is not part of a tree attached to a WebLayerTreeView.
211 virtual bool isOrphan() const = 0; 216 virtual bool isOrphan() const = 0;
212 217
213 virtual void setWebLayerClient(WebLayerClient*) = 0; 218 virtual void setWebLayerClient(WebLayerClient*) = 0;
214 }; 219 };
215 220
216 } // namespace WebKit 221 } // namespace WebKit
217 222
218 #endif // WebLayer_h 223 #endif // WebLayer_h
OLDNEW
« Source/core/platform/graphics/GraphicsLayer.cpp ('K') | « Source/web/LinkHighlight.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698