Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: android_webview/native/permission/simple_permission_request.h

Issue 2863233002: [WebView] Move files from native to browser (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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 #ifndef ANDROID_WEBVIEW_NATIVE_PERMISSION_SIMPLE_PERMISSION_REQUEST_H
6 #define ANDROID_WEBVIEW_NATIVE_PERMISSION_SIMPLE_PERMISSION_REQUEST_H
7
8 #include <stdint.h>
9
10 #include "android_webview/native/permission/aw_permission_request_delegate.h"
11 #include "base/callback.h"
12 #include "base/macros.h"
13
14 namespace android_webview {
15
16 // The class is used to handle the simple permission request which just needs
17 // a callback with bool parameter to indicate the permission granted or not.
18 class SimplePermissionRequest : public AwPermissionRequestDelegate {
19 public:
20 SimplePermissionRequest(const GURL& origin,
21 int64_t resources,
22 const base::Callback<void(bool)>& callback);
23 ~SimplePermissionRequest() override;
24
25 // AwPermissionRequestDelegate implementation.
26 const GURL& GetOrigin() override;
27 int64_t GetResources() override;
28 void NotifyRequestResult(bool allowed) override;
29
30 private:
31 const GURL origin_;
32 int64_t resources_;
33 const base::Callback<void(bool)> callback_;
34
35 DISALLOW_COPY_AND_ASSIGN(SimplePermissionRequest);
36 };
37
38 } // namespace android_webview
39
40 #endif // ANDROID_WEBVIEW_NATIVE_PERMISSION_PROTECTED_MEDIA_ID_PERMISSION_REQUE ST_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698