| OLD | NEW |
| 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 #include "config.h" | 5 #include "config.h" |
| 6 #include "modules/storage/StorageNamespaceController.h" | 6 #include "modules/storage/StorageNamespaceController.h" |
| 7 | 7 |
| 8 #include "modules/storage/InspectorDOMStorageAgent.h" | 8 #include "modules/storage/InspectorDOMStorageAgent.h" |
| 9 #include "modules/storage/StorageClient.h" | 9 #include "modules/storage/StorageClient.h" |
| 10 #include "modules/storage/StorageNamespace.h" | 10 #include "modules/storage/StorageNamespace.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 StorageNamespaceController::~StorageNamespaceController() | 25 StorageNamespaceController::~StorageNamespaceController() |
| 26 { | 26 { |
| 27 } | 27 } |
| 28 | 28 |
| 29 DEFINE_TRACE(StorageNamespaceController) | 29 DEFINE_TRACE(StorageNamespaceController) |
| 30 { | 30 { |
| 31 WillBeHeapSupplement<Page>::trace(visitor); | 31 WillBeHeapSupplement<Page>::trace(visitor); |
| 32 visitor->trace(m_inspectorAgent); | 32 visitor->trace(m_inspectorAgent); |
| 33 } | 33 } |
| 34 | 34 |
| 35 InspectorDOMStorageAgent* StorageNamespaceController::inspectorAgent() |
| 36 { |
| 37 return m_inspectorAgent; |
| 38 } |
| 39 |
| 40 void StorageNamespaceController::setInspectorAgent(InspectorDOMStorageAgent* age
nt) |
| 41 { |
| 42 m_inspectorAgent = agent; |
| 43 } |
| 44 |
| 35 StorageNamespace* StorageNamespaceController::sessionStorage(bool optionalCreate
) | 45 StorageNamespace* StorageNamespaceController::sessionStorage(bool optionalCreate
) |
| 36 { | 46 { |
| 37 if (!m_sessionStorage && optionalCreate) | 47 if (!m_sessionStorage && optionalCreate) |
| 38 m_sessionStorage = m_client->createSessionStorageNamespace(); | 48 m_sessionStorage = m_client->createSessionStorageNamespace(); |
| 39 return m_sessionStorage.get(); | 49 return m_sessionStorage.get(); |
| 40 } | 50 } |
| 41 | 51 |
| 42 void StorageNamespaceController::provideStorageNamespaceTo(Page& page, StorageCl
ient* client) | 52 void StorageNamespaceController::provideStorageNamespaceTo(Page& page, StorageCl
ient* client) |
| 43 { | 53 { |
| 44 StorageNamespaceController::provideTo(page, supplementName(), adoptPtrWillBe
Noop(new StorageNamespaceController(client))); | 54 StorageNamespaceController::provideTo(page, supplementName(), adoptPtrWillBe
Noop(new StorageNamespaceController(client))); |
| 45 } | 55 } |
| 46 | 56 |
| 47 } // namespace blink | 57 } // namespace blink |
| OLD | NEW |