Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef WindowPaintWorklet_h | 5 #ifndef WindowAnimationWorklet_h |
| 6 #define WindowPaintWorklet_h | 6 #define WindowAnimationWorklet_h |
| 7 | 7 |
| 8 #include "core/frame/DOMWindowProperty.h" | 8 #include "core/frame/DOMWindowProperty.h" |
| 9 #include "modules/ModulesExport.h" | 9 #include "modules/ModulesExport.h" |
| 10 #include "platform/Supplementable.h" | 10 #include "platform/Supplementable.h" |
| 11 #include "platform/heap/Handle.h" | 11 #include "platform/heap/Handle.h" |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 class DOMWindow; | 15 class DOMWindow; |
| 16 class ExecutionContext; | 16 class ExecutionContext; |
| 17 class PaintWorklet; | 17 class AnimationWorklet; |
| 18 class Worklet; | 18 class Worklet; |
| 19 | 19 |
| 20 class MODULES_EXPORT WindowPaintWorklet final : public GarbageCollected<WindowPa intWorklet>, public Supplement<LocalDOMWindow>, public DOMWindowProperty { | 20 class MODULES_EXPORT WindowAnimationWorklet final : public GarbageCollected<Wind owAnimationWorklet>, public Supplement<LocalDOMWindow>, public DOMWindowProperty { |
| 21 USING_GARBAGE_COLLECTED_MIXIN(WindowPaintWorklet); | 21 USING_GARBAGE_COLLECTED_MIXIN(WindowAnimationWorklet); |
| 22 public: | 22 public: |
| 23 static WindowPaintWorklet& from(LocalDOMWindow&); | 23 static WindowAnimationWorklet& from(LocalDOMWindow&); |
| 24 static Worklet* paintWorklet(ExecutionContext*, DOMWindow&); | 24 static Worklet* animationWorklet(ExecutionContext*, DOMWindow&); |
| 25 PaintWorklet* paintWorklet(ExecutionContext*) const; | 25 AnimationWorklet* animationWorklet(ExecutionContext*) const; |
| 26 | 26 |
| 27 DECLARE_TRACE(); | 27 DECLARE_TRACE(); |
| 28 | 28 |
| 29 private: | 29 private: |
| 30 explicit WindowPaintWorklet(LocalDOMWindow&); | 30 explicit WindowAnimationWorklet(LocalDOMWindow&); |
| 31 static const char* supplementName(); | 31 static const char* supplementName(); |
| 32 | 32 |
| 33 mutable Member<PaintWorklet> m_paintWorklet; | 33 mutable Member<AnimationWorklet> m_animationWorklet; |
|
yhirano
2016/07/28 14:48:17
Why is this mutable? Can't we remove the const qua
ikilpatrick
2016/07/28 20:57:05
Done, not sure why, I'll send a patch for paintwor
| |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 } // namespace blink | 36 } // namespace blink |
| 37 | 37 |
| 38 #endif // WindowPaintWorklet_h | 38 #endif // WindowAnimationWorklet_h |
| OLD | NEW |