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

Side by Side Diff: third_party/WebKit/Source/modules/compositorworker/WindowAnimationWorklet.h

Issue 2668753006: Special-case LocalDOMWindow for same-origin access in bindings. (Closed)
Patch Set: Rebase and address comments. Created 3 years, 10 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 // 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 WindowAnimationWorklet_h 5 #ifndef WindowAnimationWorklet_h
6 #define WindowAnimationWorklet_h 6 #define WindowAnimationWorklet_h
7 7
8 #include "core/dom/ContextLifecycleObserver.h" 8 #include "core/dom/ContextLifecycleObserver.h"
9 #include "core/frame/LocalDOMWindow.h"
10 #include "modules/ModulesExport.h" 9 #include "modules/ModulesExport.h"
10 #include "modules/compositorworker/AnimationWorklet.h"
11 #include "platform/Supplementable.h" 11 #include "platform/Supplementable.h"
12 #include "platform/heap/Handle.h" 12 #include "platform/heap/Handle.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 class AnimationWorklet;
17 class DOMWindow;
18 class LocalDOMWindow; 16 class LocalDOMWindow;
19 class Worklet;
20 17
21 class MODULES_EXPORT WindowAnimationWorklet final 18 class MODULES_EXPORT WindowAnimationWorklet final
22 : public GarbageCollected<WindowAnimationWorklet>, 19 : public GarbageCollected<WindowAnimationWorklet>,
23 public Supplement<LocalDOMWindow>, 20 public Supplement<LocalDOMWindow>,
24 public ContextLifecycleObserver { 21 public ContextLifecycleObserver {
25 USING_GARBAGE_COLLECTED_MIXIN(WindowAnimationWorklet); 22 USING_GARBAGE_COLLECTED_MIXIN(WindowAnimationWorklet);
26 23
27 public: 24 public:
28 static WindowAnimationWorklet& from(LocalDOMWindow&); 25 static AnimationWorklet* animationWorklet(LocalDOMWindow&);
29 static Worklet* animationWorklet(DOMWindow&);
30 AnimationWorklet* animationWorklet(LocalDOMWindow&);
31 26
32 void contextDestroyed(ExecutionContext*) override; 27 void contextDestroyed(ExecutionContext*) override;
33 28
34 DECLARE_TRACE(); 29 DECLARE_TRACE();
35 30
36 private: 31 private:
32 static WindowAnimationWorklet& from(LocalDOMWindow&);
33
37 explicit WindowAnimationWorklet(LocalDOMWindow&); 34 explicit WindowAnimationWorklet(LocalDOMWindow&);
38 static const char* supplementName(); 35 static const char* supplementName();
39 36
40 Member<AnimationWorklet> m_animationWorklet; 37 Member<AnimationWorklet> m_animationWorklet;
41 }; 38 };
42 39
43 } // namespace blink 40 } // namespace blink
44 41
45 #endif // WindowAnimationWorklet_h 42 #endif // WindowAnimationWorklet_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698