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

Unified Diff: third_party/WebKit/Source/core/frame/EventHandlerRegistry.h

Issue 2742543002: Reland of Make EventHandlerRegistry store Page instead of FrameHost (Closed)
Patch Set: Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/frame/EventHandlerRegistry.h
diff --git a/third_party/WebKit/Source/core/frame/EventHandlerRegistry.h b/third_party/WebKit/Source/core/frame/EventHandlerRegistry.h
index 5802697eb88266fe454ff78abafb73addf8eb42a..f6a46a054b6d5a7892a91901c04da4d4efa16d0c 100644
--- a/third_party/WebKit/Source/core/frame/EventHandlerRegistry.h
+++ b/third_party/WebKit/Source/core/frame/EventHandlerRegistry.h
@@ -6,7 +6,8 @@
#define EventHandlerRegistry_h
#include "core/CoreExport.h"
-#include "core/frame/FrameHost.h"
+#include "core/frame/FrameHost.h" // TODO(sashab): Remove this.
+#include "core/page/Page.h"
#include "wtf/HashCountedSet.h"
namespace blink {
@@ -20,11 +21,11 @@
// Registry for keeping track of event handlers. Note that only handlers on
// documents that can be rendered or can receive input (i.e., are attached to a
-// FrameHost) are registered here.
+// Page) are registered here.
class CORE_EXPORT EventHandlerRegistry final
: public GarbageCollectedFinalized<EventHandlerRegistry> {
public:
- explicit EventHandlerRegistry(FrameHost&);
+ explicit EventHandlerRegistry(Page&);
virtual ~EventHandlerRegistry();
// Supported event handler classes. Note that each one may correspond to
@@ -44,7 +45,7 @@
EventHandlerClassCount, // Must be the last entry.
};
- // Returns true if the FrameHost has event handlers of the specified class.
+ // Returns true if the Page has event handlers of the specified class.
bool hasEventHandlers(EventHandlerClass) const;
// Returns a set of EventTargets which have registered handlers of the given
@@ -62,11 +63,11 @@
void didRemoveEventHandler(EventTarget&, EventHandlerClass);
void didRemoveAllEventHandlers(EventTarget&);
- void didMoveIntoFrameHost(EventTarget&);
- void didMoveOutOfFrameHost(EventTarget&);
+ void didMoveIntoPage(EventTarget&);
+ void didMoveOutOfPage(EventTarget&);
- // Either |documentDetached| or |didMove{Into,OutOf,Between}FrameHosts| must
- // be called whenever the FrameHost that is associated with a registered event
+ // Either |documentDetached| or |didMove{Into,OutOf,Between}Pages| must
+ // be called whenever the Page that is associated with a registered event
// target changes. This ensures the registry does not end up with stale
// references to handlers that are no longer related to it.
void documentDetached(Document&);
@@ -120,7 +121,7 @@
void checkConsistency(EventHandlerClass) const;
- Member<FrameHost> m_frameHost;
+ Member<Page> m_page;
EventTargetSet m_targets[EventHandlerClassCount];
};
« no previous file with comments | « third_party/WebKit/Source/core/dom/Node.cpp ('k') | third_party/WebKit/Source/core/frame/EventHandlerRegistry.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698