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

Unified Diff: chrome/renderer/in_renderer_worker_permission_client_proxy.h

Issue 46583005: Send Allow{Database,FileSystem,IndexedDB} sync IPCs directly from worker thread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: chrome/renderer/in_renderer_worker_permission_client_proxy.h
diff --git a/chrome/renderer/in_renderer_worker_permission_client_proxy.h b/chrome/renderer/in_renderer_worker_permission_client_proxy.h
new file mode 100644
index 0000000000000000000000000000000000000000..c041b4b989612b355ead688115336a6935c35d56
--- /dev/null
+++ b/chrome/renderer/in_renderer_worker_permission_client_proxy.h
@@ -0,0 +1,48 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_RENDERER_IN_RENDERER_WORKER_PERMISSION_CLIENT_PROXY_H_
+#define CHROME_RENDERER_IN_RENDERER_WORKER_PERMISSION_CLIENT_PROXY_H_
+
+#include "base/basictypes.h"
+#include "base/memory/ref_counted.h"
+#include "third_party/WebKit/public/web/WebWorkerPermissionClientProxy.h"
+#include "url/gurl.h"
+
+namespace IPC {
+class SyncMessageFilter;
+}
+
+namespace WebKit {
+class WebFrame;
+}
+
+// This proxy is created on the main renderer thread then passed onto
+// the blink's worker thread.
+class InRendererWorkerPermissionClientProxy
jam 2013/10/29 17:19:57 nit: InRenderer in the class name is redundant sin
michaeln 2013/10/29 21:37:00 I think this is used specifically for dedicated wo
kinuko 2013/10/30 00:24:56 Looks like for dedicated worker stuff we don't alw
+ : public WebKit::WebWorkerPermissionClientProxy {
+ public:
+ InRendererWorkerPermissionClientProxy(WebKit::WebFrame* frame,
+ int routing_id);
+ virtual ~InRendererWorkerPermissionClientProxy();
+
+ // WebWorkerPermissionClientProxy overrides.
+ virtual bool allowDatabase(const WebKit::WebString& name,
+ const WebKit::WebString& display_name,
+ unsigned long estimated_size);
+ virtual bool allowFileSystem();
+ virtual bool allowIndexedDB(const WebKit::WebString& name);
+
+ private:
+ // Loading document context for this worker.
+ const int routing_id_;
+ bool is_unique_origin_;
+ GURL document_origin_url_;
+ GURL top_frame_origin_url_;
+ scoped_refptr<IPC::SyncMessageFilter> sync_message_filter_;
+
+ DISALLOW_COPY_AND_ASSIGN(InRendererWorkerPermissionClientProxy);
+};
+
+#endif // CHROME_RENDERER_IN_RENDERER_WORKER_PERMISSION_CLIENT_PROXY_H_

Powered by Google App Engine
This is Rietveld 408576698