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

Unified Diff: content/shell/browser/shell_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
Index: content/shell/browser/shell_permission_manager.h
diff --git a/content/shell/browser/shell_permission_manager.h b/content/shell/browser/shell_permission_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..88d413d7aa733a65d1b6156fc96ab02d96028191
--- /dev/null
+++ b/content/shell/browser/shell_permission_manager.h
@@ -0,0 +1,47 @@
+// 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_SHELL_BROWSER_SHELL_PERMISSION_MANAGER_H_
+#define CONTENT_SHELL_BROWSER_SHELL_PERMISSION_MANAGER_H_
+
+#include "base/callback_forward.h"
+#include "base/macros.h"
+#include "content/public/browser/permission_manager.h"
+
+namespace content {
+
+class ShellPermissionManager : public PermissionManager {
+ public:
+ ShellPermissionManager();
+ ~ShellPermissionManager() override;
+
+ // PermissionManager implementation.
+ void RequestPermission(
+ PermissionType permission,
+ WebContents* web_contents,
+ int request_id,
+ const GURL& requesting_origin,
+ bool user_gesture,
+ const base::Callback<void(PermissionStatus)>& callback) override;
+ void CancelPermissionRequest(PermissionType permission,
+ WebContents* web_contents,
+ int request_id,
+ const GURL& requesting_origin) override;
+ void ResetPermission(PermissionType permission,
+ const GURL& requesting_origin,
+ const GURL& embedding_origin) override;
+ PermissionStatus GetPermissionStatus(PermissionType permission,
+ const GURL& requesting_origin,
+ const GURL& embedding_origin) override;
+ void RegisterPermissionUsage(PermissionType permission,
+ const GURL& requesting_origin,
+ const GURL& embedding_origin) override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ShellPermissionManager);
+};
+
+} // namespace content
+
+#endif // CONTENT_SHELL_BROWSER_SHELL_PERMISSION_MANAGER_H
« no previous file with comments | « content/shell/browser/shell_content_browser_client.cc ('k') | content/shell/browser/shell_permission_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698