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

Side by Side Diff: Source/core/dom/custom/CustomElementCallbackScheduler.h

Issue 106903007: Let unresolved custom element go through CustomElementCallbackQueue. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 21 matching lines...) Expand all
32 #define CustomElementCallbackScheduler_h 32 #define CustomElementCallbackScheduler_h
33 33
34 #include "core/dom/custom/CustomElementCallbackQueue.h" 34 #include "core/dom/custom/CustomElementCallbackQueue.h"
35 #include "wtf/HashMap.h" 35 #include "wtf/HashMap.h"
36 #include "wtf/OwnPtr.h" 36 #include "wtf/OwnPtr.h"
37 #include "wtf/PassRefPtr.h" 37 #include "wtf/PassRefPtr.h"
38 #include "wtf/text/AtomicString.h" 38 #include "wtf/text/AtomicString.h"
39 39
40 namespace WebCore { 40 namespace WebCore {
41 41
42 class CustomElementDescriptor;
42 class CustomElementLifecycleCallbacks; 43 class CustomElementLifecycleCallbacks;
43 class Element; 44 class Element;
44 45
45 class CustomElementCallbackScheduler { 46 class CustomElementCallbackScheduler {
46 public: 47 public:
47 static void scheduleAttributeChangedCallback(PassRefPtr<CustomElementLifecyc leCallbacks>, PassRefPtr<Element>, const AtomicString& name, const AtomicString& oldValue, const AtomicString& newValue); 48 static void scheduleAttributeChangedCallback(PassRefPtr<CustomElementLifecyc leCallbacks>, PassRefPtr<Element>, const AtomicString& name, const AtomicString& oldValue, const AtomicString& newValue);
48 static void scheduleCreatedCallback(PassRefPtr<CustomElementLifecycleCallbac ks>, PassRefPtr<Element>); 49 static void scheduleCreatedCallback(PassRefPtr<CustomElementLifecycleCallbac ks>, PassRefPtr<Element>);
49 static void scheduleEnteredViewCallback(PassRefPtr<CustomElementLifecycleCal lbacks>, PassRefPtr<Element>); 50 static void scheduleEnteredViewCallback(PassRefPtr<CustomElementLifecycleCal lbacks>, PassRefPtr<Element>);
50 static void scheduleLeftViewCallback(PassRefPtr<CustomElementLifecycleCallba cks>, PassRefPtr<Element>); 51 static void scheduleLeftViewCallback(PassRefPtr<CustomElementLifecycleCallba cks>, PassRefPtr<Element>);
52 static void scheduleResolutionCallback(const CustomElementDescriptor&, PassR efPtr<Element>);
dominicc (has gone to gerrit) 2013/12/13 05:11:16 Likewise we can call this scheduleResolveStep, and
Hajime Morrita 2013/12/13 07:02:29 Done. Renaming scheduleCreatedCallback() will come
51 53
52 protected: 54 protected:
53 friend class CustomElementCallbackDispatcher; 55 friend class CustomElementCallbackDispatcher;
54 static void clearElementCallbackQueueMap(); 56 static void clearElementCallbackQueueMap();
55 57
56 private: 58 private:
57 CustomElementCallbackScheduler() { } 59 CustomElementCallbackScheduler() { }
58 60
59 static CustomElementCallbackScheduler& instance(); 61 static CustomElementCallbackScheduler& instance();
60 62
61 CustomElementCallbackQueue* ensureCallbackQueue(PassRefPtr<Element>); 63 CustomElementCallbackQueue* ensureCallbackQueue(PassRefPtr<Element>);
62 CustomElementCallbackQueue* schedule(PassRefPtr<Element>); 64 CustomElementCallbackQueue* schedule(PassRefPtr<Element>);
63 CustomElementCallbackQueue* scheduleInCurrentElementQueue(PassRefPtr<Element >); 65 CustomElementCallbackQueue* scheduleInCurrentElementQueue(PassRefPtr<Element >);
64 66
65 typedef HashMap<Element*, OwnPtr<CustomElementCallbackQueue> > ElementCallba ckQueueMap; 67 typedef HashMap<Element*, OwnPtr<CustomElementCallbackQueue> > ElementCallba ckQueueMap;
66 ElementCallbackQueueMap m_elementCallbackQueueMap; 68 ElementCallbackQueueMap m_elementCallbackQueueMap;
67 }; 69 };
68 70
69 } 71 }
70 72
71 #endif // CustomElementCallbackScheduler_h 73 #endif // CustomElementCallbackScheduler_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698