Chromium Code Reviews| Index: android_webview/native/permission/aw_permission_request_delegate.h |
| diff --git a/android_webview/native/permission/aw_permission_request_delegate.h b/android_webview/native/permission/aw_permission_request_delegate.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a1a35bcf5998549c05eabbe8340555feed5b6542 |
| --- /dev/null |
| +++ b/android_webview/native/permission/aw_permission_request_delegate.h |
| @@ -0,0 +1,36 @@ |
| +// 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/android/jni_helper.h" |
| +#include "base/android/scoped_java_ref.h" |
| +#include "base/callback.h" |
| +#include "base/memory/ref_counted.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 OnRequestResult(bool allowed) = 0; |
|
benm (inactive)
2014/04/16 14:51:10
I think this makes it sound like we are beginning
michaelbai
2014/04/22 20:53:51
Done.
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(AwPermissionRequestDelegate); |
| +}; |
| + |
| +} // namespace android_webivew |
| + |
| +#endif // ANDROID_WEBVIEW_NATIVE_PERMISSION_AW_PERMISSION_REQUEST_DELEGATE_H |