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

Side by Side Diff: Source/modules/storage/StorageNamespaceController.h

Issue 1318793005: [part 2] Make classes and structures in modules fast-allocated. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 StorageNamespaceController_h 5 #ifndef StorageNamespaceController_h
6 #define StorageNamespaceController_h 6 #define StorageNamespaceController_h
7 7
8 #include "core/page/Page.h" 8 #include "core/page/Page.h"
9 #include "modules/ModulesExport.h" 9 #include "modules/ModulesExport.h"
10 #include "platform/Supplementable.h" 10 #include "platform/Supplementable.h"
11 #include "wtf/PassOwnPtr.h" 11 #include "wtf/PassOwnPtr.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 class InspectorDOMStorageAgent; 15 class InspectorDOMStorageAgent;
16 class StorageClient; 16 class StorageClient;
17 class StorageNamespace; 17 class StorageNamespace;
18 18
19 class MODULES_EXPORT StorageNamespaceController final : public NoBaseWillBeGarba geCollectedFinalized<StorageNamespaceController>, public WillBeHeapSupplement<Pa ge> { 19 class MODULES_EXPORT StorageNamespaceController final : public NoBaseWillBeGarba geCollectedFinalized<StorageNamespaceController>, public WillBeHeapSupplement<Pa ge> {
20 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(StorageNamespaceController); 20 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(StorageNamespaceController);
21 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(StorageNamespaceController);
21 public: 22 public:
22 StorageNamespace* sessionStorage(bool optionalCreate = true); 23 StorageNamespace* sessionStorage(bool optionalCreate = true);
23 StorageClient* storageClient() { return m_client; } 24 StorageClient* storageClient() { return m_client; }
24 ~StorageNamespaceController(); 25 ~StorageNamespaceController();
25 26
26 static void provideStorageNamespaceTo(Page&, StorageClient*); 27 static void provideStorageNamespaceTo(Page&, StorageClient*);
27 static StorageNamespaceController* from(Page* page) { return static_cast<Sto rageNamespaceController*>(WillBeHeapSupplement<Page>::from(page, supplementName( ))); } 28 static StorageNamespaceController* from(Page* page) { return static_cast<Sto rageNamespaceController*>(WillBeHeapSupplement<Page>::from(page, supplementName( ))); }
28 29
29 DECLARE_TRACE(); 30 DECLARE_TRACE();
30 31
31 InspectorDOMStorageAgent* inspectorAgent() { return m_inspectorAgent; } 32 InspectorDOMStorageAgent* inspectorAgent() { return m_inspectorAgent; }
32 void setInspectorAgent(InspectorDOMStorageAgent* agent) { m_inspectorAgent = agent; } 33 void setInspectorAgent(InspectorDOMStorageAgent* agent) { m_inspectorAgent = agent; }
33 private: 34 private:
34 explicit StorageNamespaceController(StorageClient*); 35 explicit StorageNamespaceController(StorageClient*);
35 static const char* supplementName(); 36 static const char* supplementName();
36 OwnPtr<StorageNamespace> m_sessionStorage; 37 OwnPtr<StorageNamespace> m_sessionStorage;
37 StorageClient* m_client; 38 StorageClient* m_client;
38 RawPtrWillBeMember<InspectorDOMStorageAgent> m_inspectorAgent; 39 RawPtrWillBeMember<InspectorDOMStorageAgent> m_inspectorAgent;
39 }; 40 };
40 41
41 } // namespace blink 42 } // namespace blink
42 43
43 #endif // StorageNamespaceController_h 44 #endif // StorageNamespaceController_h
OLDNEW
« no previous file with comments | « Source/modules/storage/StorageNamespace.h ('k') | Source/modules/vibration/NavigatorVibration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698