| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "android_webview/native/permission/simple_permission_request.h" | 5 #include "android_webview/browser/permission/simple_permission_request.h" |
| 6 | 6 |
| 7 #include "android_webview/native/permission/aw_permission_request.h" | 7 #include "android_webview/browser/permission/aw_permission_request.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 | 9 |
| 10 namespace android_webview { | 10 namespace android_webview { |
| 11 | 11 |
| 12 SimplePermissionRequest::SimplePermissionRequest( | 12 SimplePermissionRequest::SimplePermissionRequest( |
| 13 const GURL& origin, | 13 const GURL& origin, |
| 14 int64_t resources, | 14 int64_t resources, |
| 15 const base::Callback<void(bool)>& callback) | 15 const base::Callback<void(bool)>& callback) |
| 16 : origin_(origin), resources_(resources), callback_(callback) {} | 16 : origin_(origin), resources_(resources), callback_(callback) {} |
| 17 | 17 |
| 18 SimplePermissionRequest::~SimplePermissionRequest() { | 18 SimplePermissionRequest::~SimplePermissionRequest() {} |
| 19 } | |
| 20 | 19 |
| 21 void SimplePermissionRequest::NotifyRequestResult(bool allowed) { | 20 void SimplePermissionRequest::NotifyRequestResult(bool allowed) { |
| 22 callback_.Run(allowed); | 21 callback_.Run(allowed); |
| 23 } | 22 } |
| 24 | 23 |
| 25 const GURL& SimplePermissionRequest::GetOrigin() { | 24 const GURL& SimplePermissionRequest::GetOrigin() { |
| 26 return origin_; | 25 return origin_; |
| 27 } | 26 } |
| 28 | 27 |
| 29 int64_t SimplePermissionRequest::GetResources() { | 28 int64_t SimplePermissionRequest::GetResources() { |
| 30 return resources_; | 29 return resources_; |
| 31 } | 30 } |
| 32 | 31 |
| 33 } // namespace android_webview | 32 } // namespace android_webview |
| OLD | NEW |