Chromium Code Reviews| Index: chrome/browser/permissions/chooser_permission_context_base.h |
| diff --git a/chrome/browser/permissions/chooser_permission_context_base.h b/chrome/browser/permissions/chooser_permission_context_base.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..fc8f685d3008c1efa21c6f5c96e62d58f72612e9 |
| --- /dev/null |
| +++ b/chrome/browser/permissions/chooser_permission_context_base.h |
| @@ -0,0 +1,33 @@ |
| +// Copyright 2015 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 CHROME_BROWSER_PERMISSIONS_CHOOSER_PERMISSION_CONTEXT_BASE_H_ |
| +#define CHROME_BROWSER_PERMISSIONS_CHOOSER_PERMISSION_CONTEXT_BASE_H_ |
| + |
| +#include "base/memory/scoped_ptr.h" |
| +#include "chrome/browser/permissions/permission_context_base.h" |
| + |
| +namespace base { |
| +class DictionaryValue; |
| +class ListValue; |
| +class Value; |
| +} |
| + |
| +class ChooserPermissionContextBase : public PermissionContextBase { |
|
raymes
2015/10/06 05:28:20
Mounir should have some thoughts about inheriting
Reilly Grant (use Gerrit)
2015/10/06 20:45:30
Alright.
|
| + public: |
| + ChooserPermissionContextBase(Profile* profile, |
| + ContentSettingsType permission_type); |
| + ~ChooserPermissionContextBase() override; |
| + |
| + scoped_ptr<base::ListValue> GetChosenObjects(const GURL& origin); |
|
raymes
2015/10/06 05:28:20
How is an "Object" defined?
Would GetPreviouslyCh
Reilly Grant (use Gerrit)
2015/10/06 20:45:30
An object is defined by the subclass. For the bene
raymes
2015/10/07 04:48:29
Could we impose some structure on it? This might m
Bernhard Bauer
2015/10/12 11:03:48
Yes -- for example, a chooser-based geolocation pr
Reilly Grant (use Gerrit)
2015/10/12 15:37:48
My followup UI patch adds a virtual GetStringToDis
|
| + void GrantObjectPermission(const GURL& origin, |
|
raymes
2015/10/06 05:28:20
Perhaps we should pass the top level and requestin
Reilly Grant (use Gerrit)
2015/10/06 20:45:30
Done.
|
| + scoped_ptr<base::Value> object); |
| + void RevokeObjectPermission(const GURL& origin, const base::Value& object); |
| + |
| + private: |
| + scoped_ptr<base::DictionaryValue> GetWebsiteSetting(const GURL& origin); |
| + void SetWebsiteSetting(const GURL& origin, scoped_ptr<base::Value> value); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_PERMISSIONS_CHOOSER_PERMISSION_CONTEXT_BASE_H_ |