OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef StorageManager_h | 5 #ifndef StorageManager_h |
6 #define StorageManager_h | 6 #define StorageManager_h |
7 | 7 |
8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
9 #include "platform/heap/Heap.h" | 9 #include "platform/heap/Heap.h" |
| 10 #include "public/platform/modules/permissions/permission.mojom-blink.h" |
10 | 11 |
11 namespace blink { | 12 namespace blink { |
12 | 13 |
| 14 class ExecutionContext; |
13 class ScriptPromise; | 15 class ScriptPromise; |
| 16 class ScriptPromiseResolver; |
14 class ScriptState; | 17 class ScriptState; |
15 | 18 |
16 class StorageManager final : public GarbageCollected<StorageManager>, public Scr
iptWrappable { | 19 class StorageManager final |
17 DEFINE_WRAPPERTYPEINFO(); | 20 : public GarbageCollectedFinalized<StorageManager> |
| 21 , public ScriptWrappable { |
| 22 DEFINE_WRAPPERTYPEINFO(); |
18 public: | 23 public: |
19 ScriptPromise persisted(ScriptState*); | 24 ScriptPromise persisted(ScriptState*); |
20 ScriptPromise persist(ScriptState*); | 25 ScriptPromise persist(ScriptState*); |
21 | 26 |
22 ScriptPromise estimate(ScriptState*); | 27 ScriptPromise estimate(ScriptState*); |
23 DECLARE_TRACE(); | 28 DECLARE_TRACE(); |
| 29 |
| 30 private: |
| 31 mojom::blink::PermissionService* getPermissionService(ExecutionContext*); |
| 32 void permissionServiceConnectionError(); |
| 33 void permissionRequestComplete(ScriptPromiseResolver*, mojom::blink::Permiss
ionStatus); |
| 34 |
| 35 mojom::blink::PermissionServicePtr m_permissionService; |
24 }; | 36 }; |
25 | 37 |
26 } // namespace blink | 38 } // namespace blink |
27 | 39 |
28 #endif // StorageManager_h | 40 #endif // StorageManager_h |
OLD | NEW |