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

Unified Diff: content/shell/browser/shell_permission_manager.cc

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/shell/browser/shell_permission_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/browser/shell_permission_manager.cc
diff --git a/content/shell/browser/shell_permission_manager.cc b/content/shell/browser/shell_permission_manager.cc
new file mode 100644
index 0000000000000000000000000000000000000000..609622ba3427876b6a494ed33b01baf7f6e27238
--- /dev/null
+++ b/content/shell/browser/shell_permission_manager.cc
@@ -0,0 +1,56 @@
+// 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.
+
+#include "content/shell/browser/shell_permission_manager.h"
+
+#include "base/callback.h"
+#include "content/public/browser/permission_type.h"
+
+namespace content {
+
+ShellPermissionManager::ShellPermissionManager()
+ : PermissionManager() {
+}
+
+ShellPermissionManager::~ShellPermissionManager() {
+}
+
+void ShellPermissionManager::RequestPermission(
+ PermissionType permission,
+ WebContents* web_contents,
+ int request_id,
+ const GURL& requesting_origin,
+ bool user_gesture,
+ const base::Callback<void(PermissionStatus)>& callback) {
+ callback.Run(permission == PermissionType::GEOLOCATION
+ ? PERMISSION_STATUS_GRANTED : PERMISSION_STATUS_DENIED);
+}
+
+void ShellPermissionManager::CancelPermissionRequest(
+ PermissionType permission,
+ WebContents* web_contents,
+ int request_id,
+ const GURL& requesting_origin) {
+}
+
+void ShellPermissionManager::ResetPermission(
+ PermissionType permission,
+ const GURL& requesting_origin,
+ const GURL& embedding_origin) {
+}
+
+PermissionStatus ShellPermissionManager::GetPermissionStatus(
+ PermissionType permission,
+ const GURL& requesting_origin,
+ const GURL& embedding_origin) {
+ return PERMISSION_STATUS_DENIED;
+}
+
+void ShellPermissionManager::RegisterPermissionUsage(
+ PermissionType permission,
+ const GURL& requesting_origin,
+ const GURL& embedding_origin) {
+}
+
+} // namespace content
« no previous file with comments | « content/shell/browser/shell_permission_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698