-
Notifications
You must be signed in to change notification settings - Fork 920
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
59 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import("//build/config/features.gni") | ||
|
||
source_set("permissions") { | ||
sources = [ | ||
"brave_permission_manager.cc", | ||
"brave_permission_manager.h", | ||
] | ||
|
||
deps = [ | ||
"//chrome/browser", | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
#include "brave/browser/permissions/brave_permission_manager.h" | ||
|
||
#include "brave/browser/autoplay/autoplay_permission_context.h" | ||
|
||
BravePermissionManager::BravePermissionManager(Profile* profile) | ||
: PermissionManager(profile) { | ||
permission_contexts_[CONTENT_SETTINGS_TYPE_AUTOPLAY] = | ||
std::make_unique<AutoplayPermissionContext>(profile); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
#ifndef BRAVE_BROWSER_PERMISSION_BRAVE_PERMISSION_MANAGER_H_ | ||
#define BRAVE_BROWSER_PERMISSION_BRAVE_PERMISSION_MANAGER_H_ | ||
|
||
#include "chrome/browser/permissions/permission_manager.h" | ||
|
||
class BravePermissionManager : public PermissionManager { | ||
public: | ||
explicit BravePermissionManager(Profile* profile); | ||
|
||
private: | ||
DISALLOW_COPY_AND_ASSIGN(BravePermissionManager); | ||
}; | ||
|
||
#endif // BRAVE_BROWSER_PERMISSION_BRAVE_PERMISSION_MANAGER_H_ |
2 changes: 2 additions & 0 deletions
2
chromium_src/chrome/browser/permissions/permission_manager_factory.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#define PermissionManager BravePermissionManager | ||
#include "../../../../../../chrome/browser/permissions/permission_manager_factory.cc" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
patches/chrome-browser-permissions-permission_manager.h.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
diff --git a/chrome/browser/permissions/permission_manager.h b/chrome/browser/permissions/permission_manager.h | ||
index 1a8b5734e028db6b0c063b6927a032b02d852503..a6fbebbbeb6de88c277c13570a2208c4f5b22491 100644 | ||
--- a/chrome/browser/permissions/permission_manager.h | ||
+++ b/chrome/browser/permissions/permission_manager.h | ||
@@ -120,6 +120,7 @@ class PermissionManager : public KeyedService, | ||
bool IsPermissionKillSwitchOn(ContentSettingsType); | ||
|
||
private: | ||
+ friend class BravePermissionManager; | ||
friend class PermissionManagerTest; | ||
friend class GeolocationPermissionContextTests; | ||
|