Chromium Code Reviews| 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 #ifndef CHROME_BROWSER_SUPERVISED_USER_PERMISSION_REQUEST_CREATOR_H_ | 5 #ifndef CHROME_BROWSER_SUPERVISED_USER_PERMISSION_REQUEST_CREATOR_H_ |
| 6 #define CHROME_BROWSER_SUPERVISED_USER_PERMISSION_REQUEST_CREATOR_H_ | 6 #define CHROME_BROWSER_SUPERVISED_USER_PERMISSION_REQUEST_CREATOR_H_ |
| 7 | 7 |
| 8 #include <string> | |
| 9 | |
| 8 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| 9 | 11 |
| 10 class GURL; | 12 class GURL; |
| 11 | 13 |
| 12 class PermissionRequestCreator { | 14 class PermissionRequestCreator { |
| 13 public: | 15 public: |
| 14 typedef base::Callback<void(bool)> SuccessCallback; | 16 typedef base::Callback<void(bool)> SuccessCallback; |
| 15 | 17 |
| 16 virtual ~PermissionRequestCreator() {} | 18 virtual ~PermissionRequestCreator() {} |
| 17 | 19 |
| 18 // Returns false if creating a permission request is expected to fail. | 20 // Returns false if creating a permission request is expected to fail. |
| 19 // If this method returns true, it doesn't necessary mean that creating the | 21 // If this method returns true, it doesn't necessary mean that creating the |
| 20 // permission request will succeed, just that it's not known in advance | 22 // permission request will succeed, just that it's not known in advance |
| 21 // to fail. | 23 // to fail. |
| 22 virtual bool IsEnabled() const = 0; | 24 virtual bool IsEnabled() const = 0; |
| 23 | 25 |
| 24 // Creates a permission request for |url_requested| and calls |callback| with | 26 // Creates a permission request for |url_requested| and calls |callback| with |
| 25 // the result (whether creating the permission request was successful). | 27 // the result (whether creating the permission request was successful). |
| 26 virtual void CreatePermissionRequest(const GURL& url_requested, | 28 virtual void CreateURLAccessRequest(const GURL& url_requested, |
| 27 const SuccessCallback& callback) = 0; | 29 const SuccessCallback& callback) = 0; |
| 30 | |
| 31 // Creates a request to update the extension with the given |extension_id| to | |
| 32 // the latest version. | |
| 33 virtual void CreateExtensionUpdateRequest( | |
|
Bernhard Bauer
2015/03/02 16:41:56
This isn't technically true, I think -- we update
Marc Treib
2015/03/02 18:26:00
Hm, right. I guess "ReenableRequest" would be more
| |
| 34 const std::string& extension_id, | |
| 35 const SuccessCallback& callback) = 0; | |
| 28 }; | 36 }; |
| 29 | 37 |
| 30 #endif // CHROME_BROWSER_SUPERVISED_USER_PERMISSION_REQUEST_CREATOR_H_ | 38 #endif // CHROME_BROWSER_SUPERVISED_USER_PERMISSION_REQUEST_CREATOR_H_ |
| OLD | NEW |