| 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 28 matching lines...) Expand all Loading... |
| 39 class Frame; | 39 class Frame; |
| 40 class InspectorFrontend; | 40 class InspectorFrontend; |
| 41 class InspectorPageAgent; | 41 class InspectorPageAgent; |
| 42 class InstrumentingAgents; | 42 class InstrumentingAgents; |
| 43 class JSONObject; | 43 class JSONObject; |
| 44 class Storage; | 44 class Storage; |
| 45 class StorageArea; | 45 class StorageArea; |
| 46 | 46 |
| 47 typedef String ErrorString; | 47 typedef String ErrorString; |
| 48 | 48 |
| 49 class InspectorDOMStorageAgent : public InspectorBaseAgent<InspectorDOMStorageAg
ent>, public InspectorBackendDispatcher::DOMStorageCommandHandler { | 49 class InspectorDOMStorageAgent FINAL : public InspectorBaseAgent<InspectorDOMSto
rageAgent>, public InspectorBackendDispatcher::DOMStorageCommandHandler { |
| 50 public: | 50 public: |
| 51 static PassOwnPtr<InspectorDOMStorageAgent> create(InstrumentingAgents* inst
rumentingAgents, InspectorPageAgent* pageAgent, InspectorCompositeState* state) | 51 static PassOwnPtr<InspectorDOMStorageAgent> create(InstrumentingAgents* inst
rumentingAgents, InspectorPageAgent* pageAgent, InspectorCompositeState* state) |
| 52 { | 52 { |
| 53 return adoptPtr(new InspectorDOMStorageAgent(instrumentingAgents, pageAg
ent, state)); | 53 return adoptPtr(new InspectorDOMStorageAgent(instrumentingAgents, pageAg
ent, state)); |
| 54 } | 54 } |
| 55 ~InspectorDOMStorageAgent(); | 55 virtual ~InspectorDOMStorageAgent(); |
| 56 | 56 |
| 57 virtual void setFrontend(InspectorFrontend*); | 57 virtual void setFrontend(InspectorFrontend*) OVERRIDE; |
| 58 virtual void clearFrontend(); | 58 virtual void clearFrontend() OVERRIDE; |
| 59 | 59 |
| 60 // Called from the front-end. | 60 // Called from the front-end. |
| 61 virtual void enable(ErrorString*); | 61 virtual void enable(ErrorString*) OVERRIDE; |
| 62 virtual void disable(ErrorString*); | 62 virtual void disable(ErrorString*) OVERRIDE; |
| 63 virtual void getDOMStorageItems(ErrorString*, const RefPtr<JSONObject>& stor
ageId, RefPtr<TypeBuilder::Array<TypeBuilder::Array<String> > >& items); | 63 virtual void getDOMStorageItems(ErrorString*, const RefPtr<JSONObject>& stor
ageId, RefPtr<TypeBuilder::Array<TypeBuilder::Array<String> > >& items) OVERRIDE
; |
| 64 virtual void setDOMStorageItem(ErrorString*, const RefPtr<JSONObject>& stora
geId, const String& key, const String& value); | 64 virtual void setDOMStorageItem(ErrorString*, const RefPtr<JSONObject>& stora
geId, const String& key, const String& value) OVERRIDE; |
| 65 virtual void removeDOMStorageItem(ErrorString*, const RefPtr<JSONObject>& st
orageId, const String& key); | 65 virtual void removeDOMStorageItem(ErrorString*, const RefPtr<JSONObject>& st
orageId, const String& key) OVERRIDE; |
| 66 | 66 |
| 67 // Called from the injected script. | 67 // Called from the injected script. |
| 68 String storageId(Storage*); | 68 String storageId(Storage*); |
| 69 PassRefPtr<TypeBuilder::DOMStorage::StorageId> storageId(SecurityOrigin*, bo
ol isLocalStorage); | 69 PassRefPtr<TypeBuilder::DOMStorage::StorageId> storageId(SecurityOrigin*, bo
ol isLocalStorage); |
| 70 | 70 |
| 71 // Called from InspectorInstrumentation | 71 // Called from InspectorInstrumentation |
| 72 void didDispatchDOMStorageEvent(const String& key, const String& oldValue, c
onst String& newValue, StorageType, SecurityOrigin*); | 72 void didDispatchDOMStorageEvent(const String& key, const String& oldValue, c
onst String& newValue, StorageType, SecurityOrigin*); |
| 73 | 73 |
| 74 private: | 74 private: |
| 75 | 75 |
| 76 InspectorDOMStorageAgent(InstrumentingAgents*, InspectorPageAgent*, Inspecto
rCompositeState*); | 76 InspectorDOMStorageAgent(InstrumentingAgents*, InspectorPageAgent*, Inspecto
rCompositeState*); |
| 77 | 77 |
| 78 bool isEnabled() const; | 78 bool isEnabled() const; |
| 79 PassOwnPtr<StorageArea> findStorageArea(ErrorString*, const RefPtr<JSONObjec
t>&, Frame*&); | 79 PassOwnPtr<StorageArea> findStorageArea(ErrorString*, const RefPtr<JSONObjec
t>&, Frame*&); |
| 80 | 80 |
| 81 InspectorPageAgent* m_pageAgent; | 81 InspectorPageAgent* m_pageAgent; |
| 82 InspectorFrontend* m_frontend; | 82 InspectorFrontend* m_frontend; |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 } // namespace WebCore | 85 } // namespace WebCore |
| 86 | 86 |
| 87 #endif // !defined(InspectorDOMStorageAgent_h) | 87 #endif // !defined(InspectorDOMStorageAgent_h) |
| OLD | NEW |