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 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 if (documentOrigin->toRawString() == securityOrigin) | 547 if (documentOrigin->toRawString() == securityOrigin) |
548 return toLocalFrame(frame); | 548 return toLocalFrame(frame); |
549 } | 549 } |
550 return 0; | 550 return 0; |
551 } | 551 } |
552 | 552 |
553 } // namespace | 553 } // namespace |
554 | 554 |
555 void InspectorIndexedDBAgent::provideTo(Page* page) | 555 void InspectorIndexedDBAgent::provideTo(Page* page) |
556 { | 556 { |
557 OwnPtr<InspectorIndexedDBAgent> agent(adoptPtr(new InspectorIndexedDBAgent(p
age))); | 557 OwnPtrWillBeRawPtr<InspectorIndexedDBAgent> agent(adoptPtrWillBeNoop(new Ins
pectorIndexedDBAgent(page))); |
558 page->inspectorController().registerModuleAgent(agent.release()); | 558 page->inspectorController().registerModuleAgent(agent.release()); |
559 } | 559 } |
560 | 560 |
561 InspectorIndexedDBAgent::InspectorIndexedDBAgent(Page* page) | 561 InspectorIndexedDBAgent::InspectorIndexedDBAgent(Page* page) |
562 : InspectorBaseAgent<InspectorIndexedDBAgent>("IndexedDB") | 562 : InspectorBaseAgent<InspectorIndexedDBAgent>("IndexedDB") |
563 , m_page(page) | 563 , m_page(page) |
564 { | 564 { |
565 } | 565 } |
566 | 566 |
567 InspectorIndexedDBAgent::~InspectorIndexedDBAgent() | 567 InspectorIndexedDBAgent::~InspectorIndexedDBAgent() |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
767 IDBFactory* idbFactory = assertIDBFactory(errorString, document); | 767 IDBFactory* idbFactory = assertIDBFactory(errorString, document); |
768 if (!idbFactory) | 768 if (!idbFactory) |
769 return; | 769 return; |
770 | 770 |
771 ScriptState* scriptState = ScriptState::forMainWorld(frame); | 771 ScriptState* scriptState = ScriptState::forMainWorld(frame); |
772 ScriptState::Scope scope(scriptState); | 772 ScriptState::Scope scope(scriptState); |
773 RefPtr<ClearObjectStore> clearObjectStore = ClearObjectStore::create(scriptS
tate, objectStoreName, requestCallback); | 773 RefPtr<ClearObjectStore> clearObjectStore = ClearObjectStore::create(scriptS
tate, objectStoreName, requestCallback); |
774 clearObjectStore->start(idbFactory, document->securityOrigin(), databaseName
); | 774 clearObjectStore->start(idbFactory, document->securityOrigin(), databaseName
); |
775 } | 775 } |
776 | 776 |
| 777 void InspectorIndexedDBAgent::trace(Visitor* visitor) |
| 778 { |
| 779 visitor->trace(m_page); |
| 780 InspectorBaseAgent::trace(visitor); |
| 781 } |
| 782 |
777 } // namespace blink | 783 } // namespace blink |
OLD | NEW |