Make sure webrtc::VideoSourceInterface is released on the main render thread.
[chromium-blink-merge.git] / content / worker / shared_worker_permission_client_proxy.h
blob61f58c95185ff8a09ab0c571ce63378e9c8d7972
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.
5 #ifndef CONTENT_WORKER_SHARED_WORKER_PERMISSION_CLIENT_PROXY_H_
6 #define CONTENT_WORKER_SHARED_WORKER_PERMISSION_CLIENT_PROXY_H_
8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h"
10 #include "third_party/WebKit/public/web/WebWorkerPermissionClientProxy.h"
11 #include "url/gurl.h"
13 namespace content {
15 class ThreadSafeSender;
17 // This proxy is created on the main renderer thread then passed onto
18 // the blink's worker thread.
19 class SharedWorkerPermissionClientProxy
20 : public blink::WebWorkerPermissionClientProxy {
21 public:
22 SharedWorkerPermissionClientProxy(
23 const GURL& origin_url,
24 bool is_unique_origin,
25 int routing_id,
26 ThreadSafeSender* thread_safe_sender);
27 virtual ~SharedWorkerPermissionClientProxy();
29 // WebWorkerPermissionClientProxy overrides.
30 virtual bool allowDatabase(const blink::WebString& name,
31 const blink::WebString& display_name,
32 unsigned long estimated_size);
33 virtual bool allowFileSystem();
34 virtual bool allowIndexedDB(const blink::WebString& name);
36 private:
37 const GURL origin_url_;
38 const bool is_unique_origin_;
39 const int routing_id_;
40 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
42 DISALLOW_COPY_AND_ASSIGN(SharedWorkerPermissionClientProxy);
45 } // namespace content
47 #endif // CONTENT_WORKER_SHARED_WORKER_PERMISSION_CLIENT_PROXY_H_