OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CONTENT_RENDERER_DURABLE_DISPATCHER_H_ | |
6 #define CONTENT_RENDERER_DURABLE_DISPATCHER_H_ | |
7 | |
8 #include "base/id_map.h" | |
9 #include "content/common/permission_service.mojom.h" | |
10 #include "content/public/renderer/render_frame_observer.h" | |
11 #include "third_party/WebKit/public/platform/WebURL.h" | |
12 #include "third_party/WebKit/public/platform/modules/quota/WebDurableStorageDisp atcher.h" | |
13 | |
14 using blink::WebURL; | |
15 | |
16 namespace content { | |
17 | |
18 // It works as RenderFrameObserver to keep a 1:1 relationship with a RenderFrame | |
19 // and make sure it has the same life cycle. | |
20 class DurableStorageDispatcher : public RenderFrameObserver, | |
21 public blink::WebDurableStorageDispatcher { | |
22 public: | |
23 explicit DurableStorageDispatcher(RenderFrame* render_frame); | |
24 virtual ~DurableStorageDispatcher(); | |
25 | |
26 private: | |
27 virtual void requestPermission( | |
28 const WebURL& url, | |
29 blink::WebDurableStoragePermissionCallbacks* callbacks); | |
mlamouri (slow - plz ping)
2015/07/02 09:53:01
Technically, the Blink code could directly call th
dgrogan
2015/07/07 04:15:11
That would involve adding some kind of requestPerm
dgrogan
2015/07/09 02:59:22
I deleted durable_dispatcher.h in favor of adding
| |
30 | |
31 void OnPermissionSet(PermissionStatus status); | |
32 | |
33 // TODO: | |
34 // Is this sufficient? What if permission is requested in the promise handler? | |
35 scoped_ptr<blink::WebDurableStoragePermissionCallbacks> callbacks_; | |
36 PermissionServicePtr permission_service_; | |
37 | |
38 DISALLOW_COPY_AND_ASSIGN(DurableStorageDispatcher); | |
39 }; | |
40 | |
41 } // namespace content | |
42 | |
43 #endif // CONTENT_RENDERER_DURABLE_DISPATCHER_H_ | |
OLD | NEW |