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

Unified Diff: content/public/browser/permission_manager.h

Issue 1011953003: Refactor Permissions related method out of ContentBrowserClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permission_type_enum_class
Patch Set: fix cros Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/browser/content_browser_client.cc ('k') | content/public/test/test_browser_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/permission_manager.h
diff --git a/content/public/browser/permission_manager.h b/content/public/browser/permission_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..e7300751d00b1479d3a9a0c8a7622cbb0fc229f7
--- /dev/null
+++ b/content/public/browser/permission_manager.h
@@ -0,0 +1,50 @@
+// 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 CONTENT_PUBLIC_BROWSER_PERMISSION_MANAGER_H_
+#define CONTENT_PUBLIC_BROWSER_PERMISSION_MANAGER_H_
+
+#include "content/common/content_export.h"
+#include "content/public/common/permission_status.mojom.h"
+
+class GURL;
+
+namespace content {
+enum class PermissionType;
+class WebContents;
+
+class CONTENT_EXPORT PermissionManager {
+ public:
+ virtual ~PermissionManager() = default;
+
+ virtual void RequestPermission(
+ PermissionType permission,
+ WebContents* web_contents,
+ int request_id,
+ const GURL& requesting_origin,
+ bool user_gesture,
+ const base::Callback<void(PermissionStatus)>& callback) = 0;
+
+ virtual void CancelPermissionRequest(PermissionType permission,
+ WebContents* web_contents,
+ int request_id,
+ const GURL& requesting_origin) = 0;
+
+ virtual PermissionStatus GetPermissionStatus(
+ PermissionType permission,
+ const GURL& requesting_origin,
+ const GURL& embedding_origin) = 0;
+
+ virtual void ResetPermission(PermissionType permission,
+ const GURL& requesting_origin,
+ const GURL& embedding_origin) = 0;
+
+ virtual void RegisterPermissionUsage(PermissionType permission,
+ const GURL& requesting_origin,
+ const GURL& embedding_origin) = 0;
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_PERMISSION_MANAGER_H_
« no previous file with comments | « content/public/browser/content_browser_client.cc ('k') | content/public/test/test_browser_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698