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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 IDBRequest* idbRequest = static_cast<IDBRequest*>(event->target()); | 113 IDBRequest* idbRequest = static_cast<IDBRequest*>(event->target()); |
114 IDBAny* requestResult = idbRequest->resultAsAny(); | 114 IDBAny* requestResult = idbRequest->resultAsAny(); |
115 if (requestResult->type() != IDBAny::DOMStringListType) { | 115 if (requestResult->type() != IDBAny::DOMStringListType) { |
116 m_requestCallback->sendFailure("Unexpected result type."); | 116 m_requestCallback->sendFailure("Unexpected result type."); |
117 return; | 117 return; |
118 } | 118 } |
119 | 119 |
120 RefPtrWillBeRawPtr<DOMStringList> databaseNamesList = requestResult->dom
StringList(); | 120 RefPtrWillBeRawPtr<DOMStringList> databaseNamesList = requestResult->dom
StringList(); |
121 RefPtr<TypeBuilder::Array<String>> databaseNames = TypeBuilder::Array<St
ring>::create(); | 121 RefPtr<TypeBuilder::Array<String>> databaseNames = TypeBuilder::Array<St
ring>::create(); |
122 for (size_t i = 0; i < databaseNamesList->length(); ++i) | 122 for (size_t i = 0; i < databaseNamesList->length(); ++i) |
123 databaseNames->addItem(databaseNamesList->item(i)); | 123 databaseNames->addItem(databaseNamesList->anonymousIndexedGetter(i))
; |
124 m_requestCallback->sendSuccess(databaseNames.release()); | 124 m_requestCallback->sendSuccess(databaseNames.release()); |
125 } | 125 } |
126 | 126 |
127 private: | 127 private: |
128 GetDatabaseNamesCallback(PassRefPtrWillBeRawPtr<RequestDatabaseNamesCallback
> requestCallback, const String& securityOrigin) | 128 GetDatabaseNamesCallback(PassRefPtrWillBeRawPtr<RequestDatabaseNamesCallback
> requestCallback, const String& securityOrigin) |
129 : EventListener(EventListener::CPPEventListenerType) | 129 : EventListener(EventListener::CPPEventListenerType) |
130 , m_requestCallback(requestCallback) | 130 , m_requestCallback(requestCallback) |
131 , m_securityOrigin(securityOrigin) { } | 131 , m_securityOrigin(securityOrigin) { } |
132 RefPtrWillBePersistent<RequestDatabaseNamesCallback> m_requestCallback; | 132 RefPtrWillBePersistent<RequestDatabaseNamesCallback> m_requestCallback; |
133 String m_securityOrigin; | 133 String m_securityOrigin; |
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
783 clearObjectStore->start(idbFactory, document->securityOrigin(), databaseName
); | 783 clearObjectStore->start(idbFactory, document->securityOrigin(), databaseName
); |
784 } | 784 } |
785 | 785 |
786 DEFINE_TRACE(InspectorIndexedDBAgent) | 786 DEFINE_TRACE(InspectorIndexedDBAgent) |
787 { | 787 { |
788 visitor->trace(m_page); | 788 visitor->trace(m_page); |
789 InspectorBaseAgent::trace(visitor); | 789 InspectorBaseAgent::trace(visitor); |
790 } | 790 } |
791 | 791 |
792 } // namespace blink | 792 } // namespace blink |
OLD | NEW |