summaryrefslogtreecommitdiffstats
path: root/android_webview/native/permission/aw_permission_request_delegate.h
blob: 61402b306a6d0191353ff0957da64d337d4ccb57 (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
// Copyright 2014 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 ANDROID_WEBVIEW_NATIVE_PERMISSION_AW_PERMISSION_REQUEST_DELEGATE_H
#define ANDROID_WEBVIEW_NATIVE_PERMISSION_AW_PERMISSION_REQUEST_DELEGATE_H

#include "base/basictypes.h"
#include "base/macros.h"
#include "url/gurl.h"

namespace android_webview {

// The delegate interface to be implemented for a specific permission request.
class AwPermissionRequestDelegate {
 public:
  AwPermissionRequestDelegate();
  virtual ~AwPermissionRequestDelegate();

  // Get the origin which initiated the permission request.
  virtual const GURL& GetOrigin() = 0;

  // Get the resources the origin wanted to access.
  virtual int64 GetResources() = 0;

  // Notify the permission request is allowed or not.
  virtual void NotifyRequestResult(bool allowed) = 0;

  DISALLOW_COPY_AND_ASSIGN(AwPermissionRequestDelegate);
};

}  // namespace android_webivew

#endif  // ANDROID_WEBVIEW_NATIVE_PERMISSION_AW_PERMISSION_REQUEST_DELEGATE_H