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

Unified Diff: Source/core/storage/DOMWindowStorageController.h

Issue 805773004: Create DOMWindowStorage as a DOMWindowLifecycleObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rename Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/frame/LocalDOMWindow.cpp ('k') | Source/core/storage/DOMWindowStorageController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/storage/DOMWindowStorageController.h
diff --git a/Source/core/frame/DeviceSingleWindowEventController.h b/Source/core/storage/DOMWindowStorageController.h
similarity index 31%
copy from Source/core/frame/DeviceSingleWindowEventController.h
copy to Source/core/storage/DOMWindowStorageController.h
index f90b08c4c577df6a9825c0eaa5b115c648cd9850..b43486f33e8ad7a8768a497d74edabc50cf17c17 100644
--- a/Source/core/frame/DeviceSingleWindowEventController.h
+++ b/Source/core/storage/DOMWindowStorageController.h
@@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef DeviceSingleWindowEventController_h
-#define DeviceSingleWindowEventController_h
+#ifndef DOMWindowStorageController_h
+#define DOMWindowStorageController_h
#include "core/frame/DOMWindowLifecycleObserver.h"
-#include "core/frame/PlatformEventController.h"
+#include "platform/Supplementable.h"
#include "platform/heap/Handle.h"
namespace blink {
@@ -14,36 +14,26 @@ namespace blink {
class Document;
class Event;
-class DeviceSingleWindowEventController : public NoBaseWillBeGarbageCollectedFinalized<DeviceSingleWindowEventController>, public PlatformEventController, public DOMWindowLifecycleObserver {
- WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(DeviceSingleWindowEventController);
+class DOMWindowStorageController : public NoBaseWillBeGarbageCollectedFinalized<DOMWindowStorageController>, public WillBeHeapSupplement<Document>, public DOMWindowLifecycleObserver {
+ WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(DOMWindowStorageController);
public:
- virtual ~DeviceSingleWindowEventController();
+ virtual ~DOMWindowStorageController();
- // Inherited from DeviceEventControllerBase.
- virtual void didUpdateData() override;
- virtual void trace(Visitor*);
+ static const char* supplementName();
+ static DOMWindowStorageController& from(Document&);
- // Inherited from DOMWindowLifecycleObserver.
+ // Inherited from DOMWindowLifecycleObserver
virtual void didAddEventListener(LocalDOMWindow*, const AtomicString&) override;
- virtual void didRemoveEventListener(LocalDOMWindow*, const AtomicString&) override;
- virtual void didRemoveAllEventListeners(LocalDOMWindow*) override;
protected:
- explicit DeviceSingleWindowEventController(Document&);
-
- void dispatchDeviceEvent(const PassRefPtrWillBeRawPtr<Event>);
-
- virtual PassRefPtrWillBeRawPtr<Event> lastEvent() const = 0;
- virtual const AtomicString& eventTypeName() const = 0;
- virtual bool isNullEvent(Event*) const = 0;
+ explicit DOMWindowStorageController(Document&);
private:
Document& document() const { return *m_document; }
- bool m_needsCheckingNullEvents;
RawPtrWillBeMember<Document> m_document;
};
} // namespace blink
-#endif // DeviceSingleWindowEventController_h
+#endif // DOMWindowStorageController_h
« no previous file with comments | « Source/core/frame/LocalDOMWindow.cpp ('k') | Source/core/storage/DOMWindowStorageController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698