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

Side by Side Diff: public/web/WebPermissionClient.h

Issue 277353002: Use asynchronized api for file system request. [blink] (3/4) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Changes are made. Created 6 years, 7 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
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 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 13 matching lines...) Expand all
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
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 WebPermissionClient_h 31 #ifndef WebPermissionClient_h
32 #define WebPermissionClient_h 32 #define WebPermissionClient_h
33 33
34 #include "public/platform/WebPermissionCallbacks.h"
35
34 namespace blink { 36 namespace blink {
35 37
36 class WebDocument; 38 class WebDocument;
37 class WebPermissionCallbacks;
38 class WebSecurityOrigin; 39 class WebSecurityOrigin;
39 class WebString; 40 class WebString;
40 class WebURL; 41 class WebURL;
41 42
42 class WebPermissionClient { 43 class WebPermissionClient {
43 public: 44 public:
44 // Controls whether access to Web Databases is allowed for this frame. 45 // Controls whether access to Web Databases is allowed for this frame.
45 virtual bool allowDatabase(const WebString& name, const WebString& displayNa me, unsigned long estimatedSize) { return true; } 46 virtual bool allowDatabase(const WebString& name, const WebString& displayNa me, unsigned long estimatedSize) { return true; }
46 47
47 // Controls whether access to File System is allowed for this frame. 48 // Controls whether access to File System is allowed for this frame.
48 virtual bool allowFileSystem() { return true; } 49 virtual bool requestFileSystemAccessSync() { return true; }
49 50
50 virtual void requestFileSystemAccess(const WebPermissionCallbacks& callbacks ) { } 51 // Controls whether access to File System is allowed for this frame.
52 virtual void requestFileSystemAccessAsync(const WebPermissionCallbacks& call backs) { WebPermissionCallbacks permissionCallbacks(callbacks); permissionCallba cks.doAllow(); }
Xi Han 2014/05/20 16:13:32 Add default implementation here.
51 53
52 // Controls whether images are allowed for this frame. 54 // Controls whether images are allowed for this frame.
53 virtual bool allowImage(bool enabledPerSettings, const WebURL& imageURL) { r eturn enabledPerSettings; } 55 virtual bool allowImage(bool enabledPerSettings, const WebURL& imageURL) { r eturn enabledPerSettings; }
54 56
55 // Controls whether access to Indexed DB are allowed for this frame. 57 // Controls whether access to Indexed DB are allowed for this frame.
56 virtual bool allowIndexedDB(const WebString& name, const WebSecurityOrigin&) { return true; } 58 virtual bool allowIndexedDB(const WebString& name, const WebSecurityOrigin&) { return true; }
57 59
58 // Controls whether plugins are allowed for this frame. 60 // Controls whether plugins are allowed for this frame.
59 virtual bool allowPlugins(bool enabledPerSettings) { return enabledPerSettin gs; } 61 virtual bool allowPlugins(bool enabledPerSettings) { return enabledPerSettin gs; }
60 62
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 // Notifies the client that the frame would have executed script if script w ere enabled. 111 // Notifies the client that the frame would have executed script if script w ere enabled.
110 virtual void didNotAllowScript() { } 112 virtual void didNotAllowScript() { }
111 113
112 protected: 114 protected:
113 ~WebPermissionClient() { } 115 ~WebPermissionClient() { }
114 }; 116 };
115 117
116 } // namespace blink 118 } // namespace blink
117 119
118 #endif 120 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698