Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 28 | 28 |
| 29 #ifndef IndexedDBClientImpl_h | 29 #ifndef IndexedDBClientImpl_h |
| 30 #define IndexedDBClientImpl_h | 30 #define IndexedDBClientImpl_h |
| 31 | 31 |
| 32 #include "modules/indexeddb/IndexedDBClient.h" | 32 #include "modules/indexeddb/IndexedDBClient.h" |
| 33 | 33 |
| 34 namespace blink { | 34 namespace blink { |
| 35 | 35 |
| 36 class ExecutionContext; | 36 class ExecutionContext; |
| 37 | 37 |
| 38 // TODO(haraken): Remove IndexedDBClientImpl. | 38 // TODO(haraken): Remove IndexedDBClientImpl. |
|
jsbell
2016/04/08 19:07:02
We can probably make comment less scary, given tha
| |
| 39 // This class is used to bypass the disallowed dependency from modules/ to web/ | 39 // This class is used to bypass the disallowed dependency from modules/ to web/ |
| 40 // to call allowIndexedDB() from modules/. ChromeClient is a mechanism to bypass | 40 // to call allowIndexedDB() from modules/. ChromeClient is a mechanism to bypass |
| 41 // the dependency but we cannot use ChromeClient here because | 41 // the dependency but we cannot use ChromeClient here because |
| 42 // IndexedDBClientImpl is used by worker threads but ChromeClient works only | 42 // IndexedDBClientImpl is used by worker threads but ChromeClient works only |
| 43 // for the main thread. | 43 // for the main thread. |
| 44 class IndexedDBClientImpl final : public IndexedDBClient { | 44 class IndexedDBClientImpl final : public GarbageCollectedFinalized<IndexedDBClie ntImpl>, public IndexedDBClient { |
| 45 USING_GARBAGE_COLLECTED_MIXIN(IndexedDBClientImpl); | |
| 45 public: | 46 public: |
| 46 static IndexedDBClient* create(); | 47 static IndexedDBClient* create(); |
| 47 | 48 |
| 49 ~IndexedDBClientImpl() override; | |
| 50 DECLARE_VIRTUAL_TRACE(); | |
| 51 | |
| 48 bool allowIndexedDB(ExecutionContext*, const String& name) override; | 52 bool allowIndexedDB(ExecutionContext*, const String& name) override; |
| 49 | 53 |
| 50 private: | 54 private: |
| 51 IndexedDBClientImpl() { } | 55 IndexedDBClientImpl(); |
| 52 }; | 56 }; |
| 53 | 57 |
| 54 } // namespace blink | 58 } // namespace blink |
| 55 | 59 |
| 56 #endif // IndexedDBClientImpl_h | 60 #endif // IndexedDBClientImpl_h |
| OLD | NEW |