| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_WORKER_SHARED_WORKER_PERMISSION_CLIENT_PROXY_H_ | 5 #ifndef CONTENT_WORKER_SHARED_WORKER_PERMISSION_CLIENT_PROXY_H_ |
| 6 #define CONTENT_WORKER_SHARED_WORKER_PERMISSION_CLIENT_PROXY_H_ | 6 #define CONTENT_WORKER_SHARED_WORKER_PERMISSION_CLIENT_PROXY_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "third_party/WebKit/public/web/WebWorkerPermissionClientProxy.h" | 10 #include "third_party/WebKit/public/web/WebWorkerPermissionClientProxy.h" |
| 11 #include "url/gurl.h" | 11 #include "url/gurl.h" |
| 12 | 12 |
| 13 namespace content { | 13 namespace content { |
| 14 | 14 |
| 15 class ThreadSafeSender; | 15 class ThreadSafeSender; |
| 16 | 16 |
| 17 // This proxy is created on the main renderer thread then passed onto | 17 // This proxy is created on the main renderer thread then passed onto |
| 18 // the blink's worker thread. | 18 // the blink's worker thread. |
| 19 class SharedWorkerPermissionClientProxy | 19 class SharedWorkerPermissionClientProxy |
| 20 : public WebKit::WebWorkerPermissionClientProxy { | 20 : public WebKit::WebWorkerPermissionClientProxy { |
| 21 public: | 21 public: |
| 22 SharedWorkerPermissionClientProxy( | 22 SharedWorkerPermissionClientProxy( |
| 23 const GURL& origin_url, | 23 const GURL& origin_url, |
| 24 bool is_unique_origin, |
| 24 int routing_id, | 25 int routing_id, |
| 25 ThreadSafeSender* thread_safe_sender); | 26 ThreadSafeSender* thread_safe_sender); |
| 26 virtual ~SharedWorkerPermissionClientProxy(); | 27 virtual ~SharedWorkerPermissionClientProxy(); |
| 27 | 28 |
| 28 // WebWorkerPermissionClientProxy overrides. | 29 // WebWorkerPermissionClientProxy overrides. |
| 29 virtual bool allowDatabase(const WebKit::WebString& name, | 30 virtual bool allowDatabase(const WebKit::WebString& name, |
| 30 const WebKit::WebString& display_name, | 31 const WebKit::WebString& display_name, |
| 31 unsigned long estimated_size); | 32 unsigned long estimated_size); |
| 32 virtual bool allowFileSystem(); | 33 virtual bool allowFileSystem(); |
| 33 virtual bool allowIndexedDB(const WebKit::WebString& name); | 34 virtual bool allowIndexedDB(const WebKit::WebString& name); |
| 34 | 35 |
| 35 private: | 36 private: |
| 36 const GURL origin_url_; | 37 const GURL origin_url_; |
| 38 const bool is_unique_origin_; |
| 37 const int routing_id_; | 39 const int routing_id_; |
| 38 scoped_refptr<ThreadSafeSender> thread_safe_sender_; | 40 scoped_refptr<ThreadSafeSender> thread_safe_sender_; |
| 39 | 41 |
| 40 DISALLOW_COPY_AND_ASSIGN(SharedWorkerPermissionClientProxy); | 42 DISALLOW_COPY_AND_ASSIGN(SharedWorkerPermissionClientProxy); |
| 41 }; | 43 }; |
| 42 | 44 |
| 43 } // namespace content | 45 } // namespace content |
| 44 | 46 |
| 45 #endif // CONTENT_WORKER_SHARED_WORKER_PERMISSION_CLIENT_PROXY_H_ | 47 #endif // CONTENT_WORKER_SHARED_WORKER_PERMISSION_CLIENT_PROXY_H_ |
| OLD | NEW |