summaryrefslogtreecommitdiffstats
path: root/content/browser/quota_permission_context.h
blob: 5fc2f8a1647654bf9ad42fc3bb028ac5bd8739dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Copyright (c) 2011 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_BROWSER_QUOTA_PERMISSION_CONTEXT_H_
#define CONTENT_BROWSER_QUOTA_PERMISSION_CONTEXT_H_

#include "base/callback_old.h"
#include "base/memory/ref_counted.h"
#include "webkit/quota/quota_types.h"

class GURL;

class QuotaPermissionContext
    : public base::RefCountedThreadSafe<QuotaPermissionContext> {
 public:
  enum Response {
    kResponseUnknown,
    kResponseAllow,
    kResponseDisallow,
    kResponseCancelled,
  };
  typedef Callback1<Response>::Type PermissionCallback;

  virtual void RequestQuotaPermission(
      const GURL& origin_url,
      quota::StorageType type,
      int64 new_quota,
      int render_process_id,
      int render_view_id,
      PermissionCallback* callback) = 0;

 protected:
  friend class base::RefCountedThreadSafe<QuotaPermissionContext>;
  virtual ~QuotaPermissionContext() {}
};

#endif  // CONTENT_BROWSER_QUOTA_PERMISSION_CONTEXT_H_