| 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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 InjectedScript m_injectedScript; | 541 InjectedScript m_injectedScript; |
| 542 String m_objectStoreName; | 542 String m_objectStoreName; |
| 543 String m_indexName; | 543 String m_indexName; |
| 544 RefPtr<IDBKeyRange> m_idbKeyRange; | 544 RefPtr<IDBKeyRange> m_idbKeyRange; |
| 545 int m_skipCount; | 545 int m_skipCount; |
| 546 unsigned m_pageSize; | 546 unsigned m_pageSize; |
| 547 }; | 547 }; |
| 548 | 548 |
| 549 } // namespace | 549 } // namespace |
| 550 | 550 |
| 551 InspectorIndexedDBAgent::InspectorIndexedDBAgent(InstrumentingAgents* instrument
ingAgents, InspectorCompositeState* state, InjectedScriptManager* injectedScript
Manager, InspectorPageAgent* pageAgent) | 551 PassRefPtr<InspectorIndexedDBAgent> InspectorIndexedDBAgent::create(Instrumentin
gAgents* instrumentingAgents, InspectorState* state, PassRefPtr<InspectorPageAge
nt> pageAgent, InjectedScriptManager* injectedScriptManager) |
| 552 : InspectorBaseAgent<InspectorIndexedDBAgent>("IndexedDB", instrumentingAgen
ts, state) | 552 { |
| 553 return adoptRef(new InspectorIndexedDBAgent(instrumentingAgents, state, page
Agent, injectedScriptManager)); |
| 554 } |
| 555 |
| 556 InspectorIndexedDBAgent::InspectorIndexedDBAgent(InstrumentingAgents* instrument
ingAgents, InspectorState* state, PassRefPtr<InspectorPageAgent> pageAgent, Inje
ctedScriptManager* injectedScriptManager) |
| 557 : InspectorBaseAgent(instrumentingAgents, state) |
| 553 , m_injectedScriptManager(injectedScriptManager) | 558 , m_injectedScriptManager(injectedScriptManager) |
| 554 , m_pageAgent(pageAgent) | 559 , m_pageAgent(pageAgent) |
| 555 { | 560 { |
| 556 } | 561 } |
| 557 | 562 |
| 558 InspectorIndexedDBAgent::~InspectorIndexedDBAgent() | 563 InspectorIndexedDBAgent::~InspectorIndexedDBAgent() |
| 559 { | 564 { |
| 560 } | 565 } |
| 561 | 566 |
| 562 void InspectorIndexedDBAgent::clearFrontend() | 567 void InspectorIndexedDBAgent::clearFrontend() |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 // FIXME: This should probably use ScriptState/ScriptScope instead of V8 API | 781 // FIXME: This should probably use ScriptState/ScriptScope instead of V8 API |
| 777 v8::HandleScope handleScope; | 782 v8::HandleScope handleScope; |
| 778 v8::Handle<v8::Context> context = document->frame()->script()->mainWorldCont
ext(); | 783 v8::Handle<v8::Context> context = document->frame()->script()->mainWorldCont
ext(); |
| 779 ASSERT(!context.IsEmpty()); | 784 ASSERT(!context.IsEmpty()); |
| 780 v8::Context::Scope contextScope(context); | 785 v8::Context::Scope contextScope(context); |
| 781 | 786 |
| 782 RefPtr<ClearObjectStore> clearObjectStore = ClearObjectStore::create(documen
t, objectStoreName, requestCallback); | 787 RefPtr<ClearObjectStore> clearObjectStore = ClearObjectStore::create(documen
t, objectStoreName, requestCallback); |
| 783 clearObjectStore->start(idbFactory, document->securityOrigin(), databaseName
); | 788 clearObjectStore->start(idbFactory, document->securityOrigin(), databaseName
); |
| 784 } | 789 } |
| 785 | 790 |
| 791 InspectorIndexedDBController::InspectorIndexedDBController(InstrumentingAgents*
instrumentingAgents, InspectorCompositeState* compositeState, InspectorPageContr
oller* pageController, InjectedScriptManager* injectedScriptManager) |
| 792 : InspectorBaseController<InspectorIndexedDBController, InspectorIndexedDBAg
ent>("IndexedDB", instrumentingAgents, compositeState) |
| 793 { |
| 794 setAgent(InspectorIndexedDBAgent::create(m_instrumentingAgents, m_state, pag
eController->getAgent(), injectedScriptManager)); |
| 795 } |
| 796 |
| 786 } // namespace WebCore | 797 } // namespace WebCore |
| OLD | NEW |