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

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

Issue 23455058: WIP: WebLayer::addAnimation should transfer the ownership of WebAnimation instance. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 12 matching lines...) Expand all
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #ifndef WebLayer_h 26 #ifndef WebLayer_h
27 #define WebLayer_h 27 #define WebLayer_h
28 28
29 #include "WebAnimation.h" 29 #include "WebAnimation.h"
30 #include "WebColor.h" 30 #include "WebColor.h"
31 #include "WebCommon.h" 31 #include "WebCommon.h"
32 #include "WebCompositingReasons.h" 32 #include "WebCompositingReasons.h"
33 #include "WebPassOwnPtr.h"
33 #include "WebPoint.h" 34 #include "WebPoint.h"
34 #include "WebRect.h" 35 #include "WebRect.h"
35 #include "WebString.h" 36 #include "WebString.h"
36 #include "WebVector.h" 37 #include "WebVector.h"
37 38
38 class SkMatrix44; 39 class SkMatrix44;
39 class SkImageFilter; 40 class SkImageFilter;
40 41
41 namespace WebKit { 42 namespace WebKit {
42 class WebAnimationDelegate; 43 class WebAnimationDelegate;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 // Provides a bitfield that describe why this composited layer was created. 137 // Provides a bitfield that describe why this composited layer was created.
137 virtual void setCompositingReasons(WebCompositingReasons) = 0; 138 virtual void setCompositingReasons(WebCompositingReasons) = 0;
138 139
139 // An animation delegate is notified when animations are started and 140 // An animation delegate is notified when animations are started and
140 // stopped. The WebLayer does not take ownership of the delegate, and it is 141 // stopped. The WebLayer does not take ownership of the delegate, and it is
141 // the responsibility of the client to reset the layer's delegate before 142 // the responsibility of the client to reset the layer's delegate before
142 // deleting the delegate. 143 // deleting the delegate.
143 virtual void setAnimationDelegate(WebAnimationDelegate*) = 0; 144 virtual void setAnimationDelegate(WebAnimationDelegate*) = 0;
144 145
145 // Returns false if the animation cannot be added. 146 // Returns false if the animation cannot be added.
146 virtual bool addAnimation(WebAnimation*) = 0; 147 virtual bool addAnimation(WebPassOwnPtr<WebAnimation>) = 0;
147 148
148 // Removes all animations with the given id. 149 // Removes all animations with the given id.
149 virtual void removeAnimation(int animationId) = 0; 150 virtual void removeAnimation(int animationId) = 0;
150 151
151 // Removes all animations with the given id targeting the given property. 152 // Removes all animations with the given id targeting the given property.
152 virtual void removeAnimation(int animationId, WebAnimation::TargetProperty) = 0; 153 virtual void removeAnimation(int animationId, WebAnimation::TargetProperty) = 0;
153 154
154 // Pauses all animations with the given id. 155 // Pauses all animations with the given id.
155 virtual void pauseAnimation(int animationId, double timeOffset) = 0; 156 virtual void pauseAnimation(int animationId, double timeOffset) = 0;
156 157
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 216
216 // True if the layer is not part of a tree attached to a WebLayerTreeView. 217 // True if the layer is not part of a tree attached to a WebLayerTreeView.
217 virtual bool isOrphan() const = 0; 218 virtual bool isOrphan() const = 0;
218 219
219 virtual void setWebLayerClient(WebLayerClient*) = 0; 220 virtual void setWebLayerClient(WebLayerClient*) = 0;
220 }; 221 };
221 222
222 } // namespace WebKit 223 } // namespace WebKit
223 224
224 #endif // WebLayer_h 225 #endif // WebLayer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698