| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 return adoptPtr(new InspectorDOMStorageAgent(instrumentingAgents, pageAg
ent, state)); | 56 return adoptPtr(new InspectorDOMStorageAgent(instrumentingAgents, pageAg
ent, state)); |
| 57 } | 57 } |
| 58 ~InspectorDOMStorageAgent(); | 58 ~InspectorDOMStorageAgent(); |
| 59 | 59 |
| 60 virtual void setFrontend(InspectorFrontend*); | 60 virtual void setFrontend(InspectorFrontend*); |
| 61 virtual void clearFrontend(); | 61 virtual void clearFrontend(); |
| 62 | 62 |
| 63 // Called from the front-end. | 63 // Called from the front-end. |
| 64 virtual void enable(ErrorString*); | 64 virtual void enable(ErrorString*); |
| 65 virtual void disable(ErrorString*); | 65 virtual void disable(ErrorString*); |
| 66 virtual void getDOMStorageItem(ErrorString*, const RefPtr<InspectorObject>&
storageId, const String& key, String* value); |
| 66 virtual void getDOMStorageItems(ErrorString*, const RefPtr<InspectorObject>&
storageId, RefPtr<TypeBuilder::Array<TypeBuilder::Array<String> > >& items); | 67 virtual void getDOMStorageItems(ErrorString*, const RefPtr<InspectorObject>&
storageId, RefPtr<TypeBuilder::Array<TypeBuilder::Array<String> > >& items); |
| 67 virtual void setDOMStorageItem(ErrorString*, const RefPtr<InspectorObject>&
storageId, const String& key, const String& value); | 68 virtual void setDOMStorageItem(ErrorString*, const RefPtr<InspectorObject>&
storageId, const String& key, const String& value); |
| 68 virtual void removeDOMStorageItem(ErrorString*, const RefPtr<InspectorObject
>& storageId, const String& key); | 69 virtual void removeDOMStorageItem(ErrorString*, const RefPtr<InspectorObject
>& storageId, const String& key); |
| 69 | 70 |
| 70 // Called from the injected script. | 71 // Called from the injected script. |
| 71 String storageId(Storage*); | 72 String storageId(Storage*); |
| 72 PassRefPtr<TypeBuilder::DOMStorage::StorageId> storageId(SecurityOrigin*, bo
ol isLocalStorage); | 73 PassRefPtr<TypeBuilder::DOMStorage::StorageId> storageId(SecurityOrigin*, bo
ol isLocalStorage); |
| 73 | 74 |
| 74 // Called from InspectorInstrumentation | 75 // Called from InspectorInstrumentation |
| 75 void didDispatchDOMStorageEvent(const String& key, const String& oldValue, c
onst String& newValue, StorageType, SecurityOrigin*, Page*); | 76 void didDispatchDOMStorageEvent(const String& key, const String& oldValue, c
onst String& newValue, StorageType, SecurityOrigin*, Page*); |
| 76 | 77 |
| 77 virtual void reportMemoryUsage(MemoryObjectInfo*) const OVERRIDE; | 78 virtual void reportMemoryUsage(MemoryObjectInfo*) const OVERRIDE; |
| 78 | 79 |
| 79 private: | 80 private: |
| 80 | 81 |
| 81 InspectorDOMStorageAgent(InstrumentingAgents*, InspectorPageAgent*, Inspecto
rCompositeState*); | 82 InspectorDOMStorageAgent(InstrumentingAgents*, InspectorPageAgent*, Inspecto
rCompositeState*); |
| 82 | 83 |
| 83 bool isEnabled() const; | 84 bool isEnabled() const; |
| 84 PassRefPtr<StorageArea> findStorageArea(ErrorString*, const RefPtr<Inspector
Object>&, Frame*&); | 85 PassRefPtr<StorageArea> findStorageArea(ErrorString*, const RefPtr<Inspector
Object>&, Frame*&); |
| 85 | 86 |
| 86 InspectorPageAgent* m_pageAgent; | 87 InspectorPageAgent* m_pageAgent; |
| 87 InspectorFrontend* m_frontend; | 88 InspectorFrontend* m_frontend; |
| 88 }; | 89 }; |
| 89 | 90 |
| 90 } // namespace WebCore | 91 } // namespace WebCore |
| 91 | 92 |
| 92 #endif // !defined(InspectorDOMStorageAgent_h) | 93 #endif // !defined(InspectorDOMStorageAgent_h) |
| OLD | NEW |