| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 15 matching lines...) Expand all Loading... |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef WorkerContentSettingsClient_h | 31 #ifndef WorkerContentSettingsClient_h |
| 32 #define WorkerContentSettingsClient_h | 32 #define WorkerContentSettingsClient_h |
| 33 | 33 |
| 34 #include "core/workers/WorkerClients.h" | 34 #include "core/workers/WorkerClients.h" |
| 35 #include "wtf/Forward.h" | 35 #include "wtf/Forward.h" |
| 36 #include <memory> |
| 36 | 37 |
| 37 namespace blink { | 38 namespace blink { |
| 38 | 39 |
| 39 class ExecutionContext; | 40 class ExecutionContext; |
| 40 class WebString; | 41 class WebString; |
| 41 class WebWorkerContentSettingsClientProxy; | 42 class WebWorkerContentSettingsClientProxy; |
| 42 | 43 |
| 43 class WorkerContentSettingsClient final : public GarbageCollectedFinalized<Worke
rContentSettingsClient>, public Supplement<WorkerClients> { | 44 class WorkerContentSettingsClient final : public GarbageCollectedFinalized<Worke
rContentSettingsClient>, public Supplement<WorkerClients> { |
| 44 USING_GARBAGE_COLLECTED_MIXIN(WorkerContentSettingsClient); | 45 USING_GARBAGE_COLLECTED_MIXIN(WorkerContentSettingsClient); |
| 45 public: | 46 public: |
| 46 static WorkerContentSettingsClient* create(PassOwnPtr<WebWorkerContentSettin
gsClientProxy>); | 47 static WorkerContentSettingsClient* create(std::unique_ptr<WebWorkerContentS
ettingsClientProxy>); |
| 47 virtual ~WorkerContentSettingsClient(); | 48 virtual ~WorkerContentSettingsClient(); |
| 48 | 49 |
| 49 bool requestFileSystemAccessSync(); | 50 bool requestFileSystemAccessSync(); |
| 50 bool allowIndexedDB(const WebString& name); | 51 bool allowIndexedDB(const WebString& name); |
| 51 | 52 |
| 52 static const char* supplementName(); | 53 static const char* supplementName(); |
| 53 static WorkerContentSettingsClient* from(ExecutionContext&); | 54 static WorkerContentSettingsClient* from(ExecutionContext&); |
| 54 | 55 |
| 55 DEFINE_INLINE_VIRTUAL_TRACE() { Supplement<WorkerClients>::trace(visitor); } | 56 DEFINE_INLINE_VIRTUAL_TRACE() { Supplement<WorkerClients>::trace(visitor); } |
| 56 | 57 |
| 57 private: | 58 private: |
| 58 explicit WorkerContentSettingsClient(PassOwnPtr<WebWorkerContentSettingsClie
ntProxy>); | 59 explicit WorkerContentSettingsClient(std::unique_ptr<WebWorkerContentSetting
sClientProxy>); |
| 59 | 60 |
| 60 OwnPtr<WebWorkerContentSettingsClientProxy> m_proxy; | 61 std::unique_ptr<WebWorkerContentSettingsClientProxy> m_proxy; |
| 61 }; | 62 }; |
| 62 | 63 |
| 63 void provideContentSettingsClientToWorker(WorkerClients*, PassOwnPtr<WebWorkerCo
ntentSettingsClientProxy>); | 64 void provideContentSettingsClientToWorker(WorkerClients*, std::unique_ptr<WebWor
kerContentSettingsClientProxy>); |
| 64 | 65 |
| 65 } // namespace blink | 66 } // namespace blink |
| 66 | 67 |
| 67 #endif // WorkerContentSettingsClient_h | 68 #endif // WorkerContentSettingsClient_h |
| OLD | NEW |