| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "modules/indexeddb/IndexedDBClient.h" | 5 #include "modules/indexeddb/IndexedDBClient.h" |
| 6 | 6 |
| 7 #include "core/dom/Document.h" | 7 #include "core/dom/Document.h" |
| 8 #include "core/dom/ExecutionContext.h" | 8 #include "core/dom/ExecutionContext.h" |
| 9 #include "core/frame/LocalFrame.h" | 9 #include "core/frame/LocalFrame.h" |
| 10 #include "core/workers/WorkerClients.h" | 10 #include "core/workers/WorkerClients.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 WorkerClients* clients = toWorkerGlobalScope(*context).clients(); | 24 WorkerClients* clients = toWorkerGlobalScope(*context).clients(); |
| 25 ASSERT(clients); | 25 ASSERT(clients); |
| 26 return static_cast<IndexedDBClient*>(Supplement<WorkerClients>::from(clients
, supplementName())); | 26 return static_cast<IndexedDBClient*>(Supplement<WorkerClients>::from(clients
, supplementName())); |
| 27 } | 27 } |
| 28 | 28 |
| 29 const char* IndexedDBClient::supplementName() | 29 const char* IndexedDBClient::supplementName() |
| 30 { | 30 { |
| 31 return "IndexedDBClient"; | 31 return "IndexedDBClient"; |
| 32 } | 32 } |
| 33 | 33 |
| 34 DEFINE_TRACE(IndexedDBClient) |
| 35 { |
| 36 Supplement<LocalFrame>::trace(visitor); |
| 37 Supplement<WorkerClients>::trace(visitor); |
| 38 } |
| 39 |
| 34 void provideIndexedDBClientTo(LocalFrame& frame, IndexedDBClient* client) | 40 void provideIndexedDBClientTo(LocalFrame& frame, IndexedDBClient* client) |
| 35 { | 41 { |
| 36 frame.provideSupplement(IndexedDBClient::supplementName(), client); | 42 frame.provideSupplement(IndexedDBClient::supplementName(), client); |
| 37 } | 43 } |
| 38 | 44 |
| 39 void provideIndexedDBClientToWorker(WorkerClients* clients, IndexedDBClient* cli
ent) | 45 void provideIndexedDBClientToWorker(WorkerClients* clients, IndexedDBClient* cli
ent) |
| 40 { | 46 { |
| 41 clients->provideSupplement(IndexedDBClient::supplementName(), client); | 47 clients->provideSupplement(IndexedDBClient::supplementName(), client); |
| 42 } | 48 } |
| 43 | 49 |
| 44 } // namespace blink | 50 } // namespace blink |
| OLD | NEW |