Reduce the number of helpers
This commit is contained in:
parent
4fd8b04329
commit
b2e6340622
2 changed files with 3 additions and 14 deletions
|
@ -53,13 +53,6 @@ WebContentsPermissionHelper::~WebContentsPermissionHelper() {
|
|||
}
|
||||
|
||||
void WebContentsPermissionHelper::RequestPermission(
|
||||
content::PermissionType permission,
|
||||
const base::Callback<void(bool)>& callback,
|
||||
bool user_gesture) {
|
||||
RequestPermissionWithDetails(permission, callback, user_gesture, nullptr);
|
||||
}
|
||||
|
||||
void WebContentsPermissionHelper::RequestPermissionWithDetails(
|
||||
content::PermissionType permission,
|
||||
const base::Callback<void(bool)>& callback,
|
||||
bool user_gesture,
|
||||
|
@ -107,7 +100,7 @@ void WebContentsPermissionHelper::RequestOpenExternalPermission(
|
|||
const GURL& url) {
|
||||
base::DictionaryValue details;
|
||||
details.SetString("externalURL", url.spec());
|
||||
RequestPermissionWithDetails(
|
||||
RequestPermission(
|
||||
static_cast<content::PermissionType>(PermissionType::OPEN_EXTERNAL),
|
||||
callback, user_gesture, &details);
|
||||
}
|
||||
|
|
|
@ -43,12 +43,8 @@ class WebContentsPermissionHelper
|
|||
void RequestPermission(
|
||||
content::PermissionType permission,
|
||||
const base::Callback<void(bool)>& callback,
|
||||
bool user_gesture = false);
|
||||
void RequestPermissionWithDetails(
|
||||
content::PermissionType permission,
|
||||
const base::Callback<void(bool)>& callback,
|
||||
bool user_gesture,
|
||||
const base::DictionaryValue* details);
|
||||
bool user_gesture = false,
|
||||
const base::DictionaryValue* details = nullptr);
|
||||
|
||||
content::WebContents* web_contents_;
|
||||
|
||||
|
|
Loading…
Reference in a new issue