| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 #define InspectorIndexedDBAgent_h | 32 #define InspectorIndexedDBAgent_h |
| 33 | 33 |
| 34 #include "core/inspector/InspectorBaseAgent.h" | 34 #include "core/inspector/InspectorBaseAgent.h" |
| 35 #include <wtf/PassOwnPtr.h> | 35 #include <wtf/PassOwnPtr.h> |
| 36 #include <wtf/text/WTFString.h> | 36 #include <wtf/text/WTFString.h> |
| 37 | 37 |
| 38 namespace WebCore { | 38 namespace WebCore { |
| 39 | 39 |
| 40 class InjectedScriptManager; | 40 class InjectedScriptManager; |
| 41 class InspectorPageAgent; | 41 class InspectorPageAgent; |
| 42 class InspectorPageController; |
| 42 | 43 |
| 43 typedef String ErrorString; | 44 typedef String ErrorString; |
| 44 | 45 |
| 45 class InspectorIndexedDBAgent : public InspectorBaseAgent<InspectorIndexedDBAgen
t>, public InspectorBackendDispatcher::IndexedDBCommandHandler { | 46 class InspectorIndexedDBAgent : public InspectorBaseAgent, public InspectorBacke
ndDispatcher::IndexedDBCommandHandler { |
| 46 public: | 47 public: |
| 47 static PassOwnPtr<InspectorIndexedDBAgent> create(InstrumentingAgents* instr
umentingAgents, InspectorCompositeState* state, InjectedScriptManager* injectedS
criptManager, InspectorPageAgent* pageAgent) | 48 static PassRefPtr<InspectorIndexedDBAgent> create(InstrumentingAgents*, Insp
ectorState*, PassRefPtr<InspectorPageAgent>, InjectedScriptManager*); |
| 48 { | |
| 49 return adoptPtr(new InspectorIndexedDBAgent(instrumentingAgents, state,
injectedScriptManager, pageAgent)); | |
| 50 } | |
| 51 ~InspectorIndexedDBAgent(); | 49 ~InspectorIndexedDBAgent(); |
| 52 | 50 |
| 53 virtual void clearFrontend(); | 51 virtual void clearFrontend(); |
| 54 virtual void restore(); | 52 virtual void restore(); |
| 55 | 53 |
| 56 // Called from the front-end. | 54 // Called from the front-end. |
| 57 virtual void enable(ErrorString*); | 55 virtual void enable(ErrorString*); |
| 58 virtual void disable(ErrorString*); | 56 virtual void disable(ErrorString*); |
| 59 virtual void requestDatabaseNames(ErrorString*, const String& securityOrigin
, PassRefPtr<RequestDatabaseNamesCallback>); | 57 virtual void requestDatabaseNames(ErrorString*, const String& securityOrigin
, PassRefPtr<RequestDatabaseNamesCallback>); |
| 60 virtual void requestDatabase(ErrorString*, const String& securityOrigin, con
st String& databaseName, PassRefPtr<RequestDatabaseCallback>); | 58 virtual void requestDatabase(ErrorString*, const String& securityOrigin, con
st String& databaseName, PassRefPtr<RequestDatabaseCallback>); |
| 61 virtual void requestData(ErrorString*, const String& securityOrigin, const S
tring& databaseName, const String& objectStoreName, const String& indexName, int
skipCount, int pageSize, const RefPtr<InspectorObject>* keyRange, PassRefPtr<Re
questDataCallback>); | 59 virtual void requestData(ErrorString*, const String& securityOrigin, const S
tring& databaseName, const String& objectStoreName, const String& indexName, int
skipCount, int pageSize, const RefPtr<InspectorObject>* keyRange, PassRefPtr<Re
questDataCallback>); |
| 62 virtual void clearObjectStore(ErrorString*, const String& in_securityOrigin,
const String& in_databaseName, const String& in_objectStoreName, PassRefPtr<Cle
arObjectStoreCallback>); | 60 virtual void clearObjectStore(ErrorString*, const String& in_securityOrigin,
const String& in_databaseName, const String& in_objectStoreName, PassRefPtr<Cle
arObjectStoreCallback>); |
| 63 | 61 |
| 64 private: | 62 private: |
| 65 InspectorIndexedDBAgent(InstrumentingAgents*, InspectorCompositeState*, Inje
ctedScriptManager*, InspectorPageAgent*); | 63 InspectorIndexedDBAgent(InstrumentingAgents*, InspectorState*, PassRefPtr<In
spectorPageAgent>, InjectedScriptManager*); |
| 66 | 64 |
| 67 InjectedScriptManager* m_injectedScriptManager; | 65 InjectedScriptManager* m_injectedScriptManager; |
| 68 InspectorPageAgent* m_pageAgent; | 66 RefPtr<InspectorPageAgent> m_pageAgent; |
| 67 }; |
| 68 |
| 69 class InspectorIndexedDBController: public InspectorBaseController<InspectorInde
xedDBController, InspectorIndexedDBAgent> { |
| 70 public: |
| 71 |
| 72 static PassOwnPtr<InspectorIndexedDBController> create(InstrumentingAgents*
instrumentingAgents, InspectorCompositeState* compositeState, InspectorPageContr
oller* pageController, InjectedScriptManager* injectedScriptManager) |
| 73 { |
| 74 return adoptPtr(new InspectorIndexedDBController(instrumentingAgents, co
mpositeState, pageController, injectedScriptManager)); |
| 75 } |
| 76 |
| 77 protected: |
| 78 InspectorIndexedDBController(InstrumentingAgents*, InspectorCompositeState*,
InspectorPageController*, InjectedScriptManager*); |
| 69 }; | 79 }; |
| 70 | 80 |
| 71 } // namespace WebCore | 81 } // namespace WebCore |
| 72 | 82 |
| 73 #endif // !defined(InspectorIndexedDBAgent_h) | 83 #endif // !defined(InspectorIndexedDBAgent_h) |
| OLD | NEW |