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

Unified Diff: Source/web/WorkerPermissionClient.h

Issue 50773002: Introduce WebWorkerPermissionClientProxy to deprecate WorkerAllowMainThreadBridge (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: updated comments, minor code fix Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/WorkerFileSystemClient.cpp ('k') | Source/web/WorkerPermissionClient.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WorkerPermissionClient.h
diff --git a/Source/modules/filesystem/WorkerLocalFileSystem.h b/Source/web/WorkerPermissionClient.h
similarity index 61%
copy from Source/modules/filesystem/WorkerLocalFileSystem.h
copy to Source/web/WorkerPermissionClient.h
index 72242b5f06cc068bfd5e2f734e1a90338fe641f3..95f743d57f9cb1912800f46acc50cbee208756f2 100644
--- a/Source/modules/filesystem/WorkerLocalFileSystem.h
+++ b/Source/web/WorkerPermissionClient.h
@@ -28,26 +28,46 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WorkerLocalFileSystem_h
-#define WorkerLocalFileSystem_h
+#ifndef WorkerPermissionClient_h
+#define WorkerPermissionClient_h
#include "core/workers/WorkerClients.h"
-#include "modules/filesystem/LocalFileSystem.h"
#include "wtf/Forward.h"
namespace WebCore {
+class ExecutionContext;
+}
-class WorkerLocalFileSystem : public LocalFileSystemBase, public Supplement<WorkerClients> {
+namespace WebKit {
+
+class WebFrame;
+class WebString;
+class WebWorkerPermissionClientProxy;
+
+class WorkerPermissionClient : public WebCore::Supplement<WebCore::WorkerClients> {
public:
- static PassOwnPtr<WorkerLocalFileSystem> create(PassOwnPtr<FileSystemClient>);
+ static PassOwnPtr<WorkerPermissionClient> create(PassOwnPtr<WebWorkerPermissionClientProxy>);
+
+ virtual ~WorkerPermissionClient();
+
+ bool allowDatabase(const WebString& name, const WebString& displayName, unsigned long estimatedSize);
+ bool allowFileSystem();
+ bool allowIndexedDB(const WebString& name);
+
+ // FIXME: Remove this after embedder implement this.
+ WebWorkerPermissionClientProxy* proxy() { return m_proxy.get(); }
+
static const char* supplementName();
- static WorkerLocalFileSystem* from(ExecutionContext*);
- virtual ~WorkerLocalFileSystem();
+ static WorkerPermissionClient* from(WebCore::ExecutionContext*);
private:
- explicit WorkerLocalFileSystem(PassOwnPtr<FileSystemClient>);
+ explicit WorkerPermissionClient(PassOwnPtr<WebWorkerPermissionClientProxy>);
+
+ OwnPtr<WebWorkerPermissionClientProxy> m_proxy;
};
-} // namespace WebCore
+void providePermissionClientToWorker(WebCore::WorkerClients*, PassOwnPtr<WebWorkerPermissionClientProxy>);
+
+} // namespace WebKit
-#endif // WorkerLocalFileSystem_h
+#endif // WorkerPermissionClient_h
« no previous file with comments | « Source/web/WorkerFileSystemClient.cpp ('k') | Source/web/WorkerPermissionClient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698