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

Side by Side Diff: content/browser/permissions/permission_service_impl.h

Issue 819463002: Implement RevokePermission() method in PermissionService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, fix todo comments Created 5 years, 10 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 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 #ifndef CONTENT_BROWSER_PERMISSIONS_PERMISSION_SERVICE_IMPL_H_ 5 #ifndef CONTENT_BROWSER_PERMISSIONS_PERMISSION_SERVICE_IMPL_H_
6 #define CONTENT_BROWSER_PERMISSIONS_PERMISSION_SERVICE_IMPL_H_ 6 #define CONTENT_BROWSER_PERMISSIONS_PERMISSION_SERVICE_IMPL_H_
7 7
8 #include "base/id_map.h" 8 #include "base/id_map.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // PermissionService. 45 // PermissionService.
46 void HasPermission( 46 void HasPermission(
47 PermissionName permission, 47 PermissionName permission,
48 const mojo::String& origin, 48 const mojo::String& origin,
49 const mojo::Callback<void(PermissionStatus)>& callback) override; 49 const mojo::Callback<void(PermissionStatus)>& callback) override;
50 void RequestPermission( 50 void RequestPermission(
51 PermissionName permission, 51 PermissionName permission,
52 const mojo::String& origin, 52 const mojo::String& origin,
53 bool user_gesture, 53 bool user_gesture,
54 const mojo::Callback<void(PermissionStatus)>& callback) override; 54 const mojo::Callback<void(PermissionStatus)>& callback) override;
55 void RevokePermission(
56 PermissionName permission,
57 const mojo::String& origin,
58 const mojo::Callback<void(PermissionStatus)>& callback) override;
55 59
56 // mojo::InterfaceImpl. 60 // mojo::InterfaceImpl.
57 void OnConnectionError() override; 61 void OnConnectionError() override;
58 62
59 void OnRequestPermissionResponse( 63 void OnRequestPermissionResponse(
60 const mojo::Callback<void(PermissionStatus)>& callback, 64 const mojo::Callback<void(PermissionStatus)>& callback,
61 int request_id, 65 int request_id,
62 bool allowed); 66 bool allowed);
63 67
68 PermissionStatus GetPermissionStatus(PermissionType type, GURL origin);
69 void ResetPermissionStatus(PermissionType type, GURL origin);
70
64 RequestsMap pending_requests_; 71 RequestsMap pending_requests_;
65 // context_ owns |this|. 72 // context_ owns |this|.
66 PermissionServiceContext* context_; 73 PermissionServiceContext* context_;
67 base::WeakPtrFactory<PermissionServiceImpl> weak_factory_; 74 base::WeakPtrFactory<PermissionServiceImpl> weak_factory_;
68 75
69 DISALLOW_COPY_AND_ASSIGN(PermissionServiceImpl); 76 DISALLOW_COPY_AND_ASSIGN(PermissionServiceImpl);
70 }; 77 };
71 78
72 } // namespace content 79 } // namespace content
73 80
74 #endif // CONTENT_BROWSER_PERMISSIONS_PERMISSION_SERVICE_IMPL_H_ 81 #endif // CONTENT_BROWSER_PERMISSIONS_PERMISSION_SERVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698