Make sure webrtc::VideoSourceInterface is released on the main render thread.
[chromium-blink-merge.git] / content / public / browser / quota_permission_context.h
blob5950f233ff5df90a997848fdc07535f2385d3c9d
1 // Copyright (c) 2012 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_PUBLIC_BROWSER_QUOTA_PERMISSION_CONTEXT_H_
6 #define CONTENT_PUBLIC_BROWSER_QUOTA_PERMISSION_CONTEXT_H_
8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h"
10 #include "content/public/common/storage_quota_params.h"
11 #include "webkit/common/quota/quota_types.h"
13 class GURL;
15 namespace content {
17 class QuotaPermissionContext
18 : public base::RefCountedThreadSafe<QuotaPermissionContext> {
19 public:
20 enum QuotaPermissionResponse {
21 QUOTA_PERMISSION_RESPONSE_UNKNOWN,
22 QUOTA_PERMISSION_RESPONSE_ALLOW,
23 QUOTA_PERMISSION_RESPONSE_DISALLOW,
24 QUOTA_PERMISSION_RESPONSE_CANCELLED,
27 typedef base::Callback<void(QuotaPermissionResponse)> PermissionCallback;
29 virtual void RequestQuotaPermission(
30 const StorageQuotaParams& params,
31 int render_process_id,
32 const PermissionCallback& callback) = 0;
34 protected:
35 friend class base::RefCountedThreadSafe<QuotaPermissionContext>;
36 virtual ~QuotaPermissionContext() {}
39 } // namespace content
41 #endif // CONTENT_PUBLIC_BROWSER_QUOTA_PERMISSION_CONTEXT_H_