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

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: Apply GraphicsLayerTest also Created 7 years, 1 month 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
« no previous file with comments | « Source/web/tests/GraphicsLayerTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_TRANSFER
141
139 // Returns false if the animation cannot be added. 142 // Returns false if the animation cannot be added.
143 // Takes ownership of the WebAnimation object.
140 virtual bool addAnimation(WebAnimation*) = 0; 144 virtual bool addAnimation(WebAnimation*) = 0;
141 145
142 // Removes all animations with the given id. 146 // Removes all animations with the given id.
143 virtual void removeAnimation(int animationId) = 0; 147 virtual void removeAnimation(int animationId) = 0;
144 148
145 // Removes all animations with the given id targeting the given property. 149 // Removes all animations with the given id targeting the given property.
146 virtual void removeAnimation(int animationId, WebAnimation::TargetProperty) = 0; 150 virtual void removeAnimation(int animationId, WebAnimation::TargetProperty) = 0;
147 151
148 // Pauses all animations with the given id. 152 // Pauses all animations with the given id.
149 virtual void pauseAnimation(int animationId, double timeOffset) = 0; 153 virtual void pauseAnimation(int animationId, double timeOffset) = 0;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 212
209 // True if the layer is not part of a tree attached to a WebLayerTreeView. 213 // True if the layer is not part of a tree attached to a WebLayerTreeView.
210 virtual bool isOrphan() const = 0; 214 virtual bool isOrphan() const = 0;
211 215
212 virtual void setWebLayerClient(WebLayerClient*) = 0; 216 virtual void setWebLayerClient(WebLayerClient*) = 0;
213 }; 217 };
214 218
215 } // namespace WebKit 219 } // namespace WebKit
216 220
217 #endif // WebLayer_h 221 #endif // WebLayer_h
OLDNEW
« no previous file with comments | « Source/web/tests/GraphicsLayerTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698