| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2011 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. | |
| 4 | |
| 5 #ifndef CONTENT_BROWSER_QUOTA_PERMISSION_CONTEXT_H_ | |
| 6 #define CONTENT_BROWSER_QUOTA_PERMISSION_CONTEXT_H_ | |
| 7 | |
| 8 #include "base/callback.h" | |
| 9 #include "base/memory/ref_counted.h" | |
| 10 #include "webkit/quota/quota_types.h" | |
| 11 | |
| 12 class GURL; | |
| 13 | |
| 14 class QuotaPermissionContext | |
| 15 : public base::RefCountedThreadSafe<QuotaPermissionContext> { | |
| 16 public: | |
| 17 enum Response { | |
| 18 kResponseUnknown, | |
| 19 kResponseAllow, | |
| 20 kResponseDisallow, | |
| 21 kResponseCancelled, | |
| 22 }; | |
| 23 | |
| 24 typedef base::Callback<void(Response)> PermissionCallback; | |
| 25 | |
| 26 virtual void RequestQuotaPermission( | |
| 27 const GURL& origin_url, | |
| 28 quota::StorageType type, | |
| 29 int64 new_quota, | |
| 30 int render_process_id, | |
| 31 int render_view_id, | |
| 32 const PermissionCallback& callback) = 0; | |
| 33 | |
| 34 protected: | |
| 35 friend class base::RefCountedThreadSafe<QuotaPermissionContext>; | |
| 36 virtual ~QuotaPermissionContext() {} | |
| 37 }; | |
| 38 | |
| 39 #endif // CONTENT_BROWSER_QUOTA_PERMISSION_CONTEXT_H_ | |
| OLD | NEW |