Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Side by Side Diff: content/renderer/durable_dispatcher.h

Issue 1164073005: Allow script to request durable storage permission (chrome side) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased onto content setting patch Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698