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

Side by Side Diff: content/shell/browser/shell_permission_manager.h

Issue 1260193009: renderer: implement multiple permission requesting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permissions-request-multiple
Patch Set: Fix review comments Created 5 years, 3 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef CONTENT_SHELL_BROWSER_SHELL_PERMISSION_MANAGER_H_ 5 #ifndef CONTENT_SHELL_BROWSER_SHELL_PERMISSION_MANAGER_H_
6 #define CONTENT_SHELL_BROWSER_SHELL_PERMISSION_MANAGER_H_ 6 #define CONTENT_SHELL_BROWSER_SHELL_PERMISSION_MANAGER_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "content/public/browser/permission_manager.h" 10 #include "content/public/browser/permission_manager.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 class ShellPermissionManager : public PermissionManager { 14 class ShellPermissionManager : public PermissionManager {
15 public: 15 public:
16 ShellPermissionManager(); 16 ShellPermissionManager();
17 ~ShellPermissionManager() override; 17 ~ShellPermissionManager() override;
18 18
19 // PermissionManager implementation. 19 // PermissionManager implementation.
20 void RequestPermission( 20 void RequestPermission(
21 PermissionType permission, 21 PermissionType permission,
22 RenderFrameHost* render_frame_host, 22 RenderFrameHost* render_frame_host,
23 int request_id, 23 int request_id,
24 const GURL& requesting_origin, 24 const GURL& requesting_origin,
25 bool user_gesture, 25 bool user_gesture,
26 const base::Callback<void(PermissionStatus)>& callback) override; 26 const base::Callback<void(PermissionStatus)>& callback) override;
27 void CancelPermissionRequest(PermissionType permission, 27 void RequestPermission(
28 RenderFrameHost* render_frame_host, 28 const std::vector<PermissionType>& permission,
29 int request_id, 29 RenderFrameHost* render_frame_host,
30 const GURL& requesting_origin) override; 30 int request_id,
31 const GURL& requesting_origin,
32 bool user_gesture,
33 const BatchRequestCallback& callback) override;
34 void CancelPermissionRequest(RenderFrameHost* render_frame_host,
35 int request_id) override;
31 void ResetPermission(PermissionType permission, 36 void ResetPermission(PermissionType permission,
32 const GURL& requesting_origin, 37 const GURL& requesting_origin,
33 const GURL& embedding_origin) override; 38 const GURL& embedding_origin) override;
34 PermissionStatus GetPermissionStatus(PermissionType permission, 39 PermissionStatus GetPermissionStatus(PermissionType permission,
35 const GURL& requesting_origin, 40 const GURL& requesting_origin,
36 const GURL& embedding_origin) override; 41 const GURL& embedding_origin) override;
37 void RegisterPermissionUsage(PermissionType permission, 42 void RegisterPermissionUsage(PermissionType permission,
38 const GURL& requesting_origin, 43 const GURL& requesting_origin,
39 const GURL& embedding_origin) override; 44 const GURL& embedding_origin) override;
40 int SubscribePermissionStatusChange( 45 int SubscribePermissionStatusChange(
41 PermissionType permission, 46 PermissionType permission,
42 const GURL& requesting_origin, 47 const GURL& requesting_origin,
43 const GURL& embedding_origin, 48 const GURL& embedding_origin,
44 const base::Callback<void(PermissionStatus)>& callback) override; 49 const base::Callback<void(PermissionStatus)>& callback) override;
45 void UnsubscribePermissionStatusChange(int subscription_id) override; 50 void UnsubscribePermissionStatusChange(int subscription_id) override;
46 51
47 private: 52 private:
48 DISALLOW_COPY_AND_ASSIGN(ShellPermissionManager); 53 DISALLOW_COPY_AND_ASSIGN(ShellPermissionManager);
49 }; 54 };
50 55
51 } // namespace content 56 } // namespace content
52 57
53 #endif // CONTENT_SHELL_BROWSER_SHELL_PERMISSION_MANAGER_H 58 #endif // CONTENT_SHELL_BROWSER_SHELL_PERMISSION_MANAGER_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698