OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * Copyright (C) 2013 Samsung Electronics. All rights reserved. | 3 * Copyright (C) 2013 Samsung Electronics. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
106 void InspectorDOMStorageAgent::enable(ErrorString*) | 106 void InspectorDOMStorageAgent::enable(ErrorString*) |
107 { | 107 { |
108 m_state->setBoolean(DOMStorageAgentState::domStorageAgentEnabled, true); | 108 m_state->setBoolean(DOMStorageAgentState::domStorageAgentEnabled, true); |
109 } | 109 } |
110 | 110 |
111 void InspectorDOMStorageAgent::disable(ErrorString*) | 111 void InspectorDOMStorageAgent::disable(ErrorString*) |
112 { | 112 { |
113 m_state->setBoolean(DOMStorageAgentState::domStorageAgentEnabled, false); | 113 m_state->setBoolean(DOMStorageAgentState::domStorageAgentEnabled, false); |
114 } | 114 } |
115 | 115 |
116 void InspectorDOMStorageAgent::getDOMStorageItem(ErrorString* errorString, const RefPtr<InspectorObject>& storageId, const String& key, String* value) | |
117 { | |
118 Frame* frame; | |
119 RefPtr<StorageArea> storageArea = findStorageArea(errorString, storageId, fr ame); | |
120 if (!storageArea) | |
121 return; | |
122 | |
123 ExceptionCode ec = 0; | |
124 *value = storageArea->getItem(key, ec, frame); | |
125 if (hadException(ec, errorString)) | |
126 return; | |
apavlov
2013/05/08 11:41:36
This doesn't make much sense, does it?
| |
127 } | |
128 | |
116 void InspectorDOMStorageAgent::getDOMStorageItems(ErrorString* errorString, cons t RefPtr<InspectorObject>& storageId, RefPtr<TypeBuilder::Array<TypeBuilder::Arr ay<String> > >& items) | 129 void InspectorDOMStorageAgent::getDOMStorageItems(ErrorString* errorString, cons t RefPtr<InspectorObject>& storageId, RefPtr<TypeBuilder::Array<TypeBuilder::Arr ay<String> > >& items) |
117 { | 130 { |
118 Frame* frame; | 131 Frame* frame; |
119 RefPtr<StorageArea> storageArea = findStorageArea(errorString, storageId, fr ame); | 132 RefPtr<StorageArea> storageArea = findStorageArea(errorString, storageId, fr ame); |
120 if (!storageArea) | 133 if (!storageArea) |
121 return; | 134 return; |
122 | 135 |
123 RefPtr<TypeBuilder::Array<TypeBuilder::Array<String> > > storageItems = Type Builder::Array<TypeBuilder::Array<String> >::create(); | 136 RefPtr<TypeBuilder::Array<TypeBuilder::Array<String> > > storageItems = Type Builder::Array<TypeBuilder::Array<String> >::create(); |
124 | 137 |
125 ExceptionCode ec = 0; | 138 ExceptionCode ec = 0; |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
240 | 253 |
241 void InspectorDOMStorageAgent::reportMemoryUsage(MemoryObjectInfo* memoryObjectI nfo) const | 254 void InspectorDOMStorageAgent::reportMemoryUsage(MemoryObjectInfo* memoryObjectI nfo) const |
242 { | 255 { |
243 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::InspectorDO MStorageAgent); | 256 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::InspectorDO MStorageAgent); |
244 InspectorBaseAgent<InspectorDOMStorageAgent>::reportMemoryUsage(memoryObject Info); | 257 InspectorBaseAgent<InspectorDOMStorageAgent>::reportMemoryUsage(memoryObject Info); |
245 info.addWeakPointer(m_frontend); | 258 info.addWeakPointer(m_frontend); |
246 } | 259 } |
247 | 260 |
248 } // namespace WebCore | 261 } // namespace WebCore |
249 | 262 |
OLD | NEW |