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

Unified Diff: content/worker/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: content/worker/worker_permission_client_proxy.h
diff --git a/content/worker/worker_permission_client_proxy.h b/content/worker/worker_permission_client_proxy.h
new file mode 100644
index 0000000000000000000000000000000000000000..6cdeb26972eac6ccf57e6c7cdda58bb1d85af0f5
--- /dev/null
+++ b/content/worker/worker_permission_client_proxy.h
@@ -0,0 +1,44 @@
+// 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 CONTENT_WORKER_WORKER_PERMISSION_CLIENT_PROXY_H_
+#define CONTENT_WORKER_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 content {
+
+class ThreadSafeSender;
+
+// This proxy is created on the main renderer thread then passed onto
+// the blink's worker thread.
+class WorkerPermissionClientProxy
+ : public WebKit::WebWorkerPermissionClientProxy {
+ public:
+ WorkerPermissionClientProxy(const GURL& origin_url,
+ int routing_id,
+ content::ThreadSafeSender* thread_safe_sender);
jam 2013/10/29 17:19:57 nit: here and below and in the cc file, no content
kinuko 2013/10/30 00:24:56 Done.
+ virtual ~WorkerPermissionClientProxy();
+
+ // 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:
+ const GURL origin_url_;
+ const int routing_id_;
+ scoped_refptr<content::ThreadSafeSender> thread_safe_sender_;
+
+ DISALLOW_COPY_AND_ASSIGN(WorkerPermissionClientProxy);
+};
+
+} // namespace content
+
+#endif // CONTENT_WORKER_WORKER_PERMISSION_CLIENT_PROXY_H_

Powered by Google App Engine
This is Rietveld 408576698