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

Unified Diff: chrome/browser/permissions/delegation_tracker.h

Issue 2733823004: Remove old permission delegation prototype (Closed)
Patch Set: update webexposed layout tests Created 3 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 | « chrome/browser/BUILD.gn ('k') | chrome/browser/permissions/delegation_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/permissions/delegation_tracker.h
diff --git a/chrome/browser/permissions/delegation_tracker.h b/chrome/browser/permissions/delegation_tracker.h
deleted file mode 100644
index 68c1e7917a22de55dabc15455d76541d1172fff3..0000000000000000000000000000000000000000
--- a/chrome/browser/permissions/delegation_tracker.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2016 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_DELEGATION_TRACKER_H_
-#define CHROME_BROWSER_PERMISSIONS_DELEGATION_TRACKER_H_
-
-#include <memory>
-#include <unordered_map>
-#include <vector>
-
-#include "base/macros.h"
-#include "components/content_settings/core/common/content_settings_types.h"
-
-namespace content {
-
-class RenderFrameHost;
-
-} // namespace content
-
-// Keeps track of which permissions are delegated to frames. There are two
-// operations possible:
-// 1) Setting the permissions which are delegated to a frame by its parent, and
-// 2) Querying whether a particular permission is granted to a frame.
-//
-// If a frame is destroyed or navigated, permissions will no longer be delegated
-// to it.
-class DelegationTracker {
- public:
- DelegationTracker();
- ~DelegationTracker();
-
- // Set the |permissions| which are delegated to |child_rfh| by its parent.
- void SetDelegatedPermissions(
- content::RenderFrameHost* child_rfh,
- const std::vector<ContentSettingsType>& permissions);
-
- // Query whether |permission| is granted to |requesting_rfh|. This will return
- // true if |requesting_rfh| is a top-level frame or if it has been delegated
- // |permission| through its ancestor frames. Specifically, each frame on the
- // path between the main frame and |requesting_rfh| must either delegate
- // |permission| to it's child OR have the same origin as it's child on that
- // path in order for this to return true.
- bool IsGranted(content::RenderFrameHost* requesting_rfh,
- ContentSettingsType permission);
-
- private:
- class DelegatedForChild;
-
- void RenderFrameHostChanged(content::RenderFrameHost* rfh);
-
- std::unordered_map<content::RenderFrameHost*,
- std::unique_ptr<DelegatedForChild>>
- delegated_permissions_;
-
- DISALLOW_COPY_AND_ASSIGN(DelegationTracker);
-};
-
-#endif // CHROME_BROWSER_PERMISSIONS_DELEGATION_TRACKER_H_
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/permissions/delegation_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698