1// Copyright 2014 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#include "android_webview/native/permission/simple_permission_request.h"
6
7#include "android_webview/native/permission/aw_permission_request.h"
8#include "base/callback.h"
9
10namespace android_webview {
11
12SimplePermissionRequest::SimplePermissionRequest(
13    const GURL& origin,
14    int64 resources,
15    const base::Callback<void(bool)>& callback)
16    : origin_(origin),
17      resources_(resources),
18      callback_(callback) {
19}
20
21SimplePermissionRequest::~SimplePermissionRequest() {
22}
23
24void SimplePermissionRequest::NotifyRequestResult(bool allowed) {
25  callback_.Run(allowed);
26}
27
28const GURL& SimplePermissionRequest::GetOrigin() {
29  return origin_;
30}
31
32int64 SimplePermissionRequest::GetResources() {
33  return resources_;
34}
35
36}  // namespace android_webview
37