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(
|
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,
|
content::PermissionType permission,
|
||||||
const base::Callback<void(bool)>& callback,
|
const base::Callback<void(bool)>& callback,
|
||||||
bool user_gesture,
|
bool user_gesture,
|
||||||
|
@ -107,7 +100,7 @@ void WebContentsPermissionHelper::RequestOpenExternalPermission(
|
||||||
const GURL& url) {
|
const GURL& url) {
|
||||||
base::DictionaryValue details;
|
base::DictionaryValue details;
|
||||||
details.SetString("externalURL", url.spec());
|
details.SetString("externalURL", url.spec());
|
||||||
RequestPermissionWithDetails(
|
RequestPermission(
|
||||||
static_cast<content::PermissionType>(PermissionType::OPEN_EXTERNAL),
|
static_cast<content::PermissionType>(PermissionType::OPEN_EXTERNAL),
|
||||||
callback, user_gesture, &details);
|
callback, user_gesture, &details);
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,12 +43,8 @@ class WebContentsPermissionHelper
|
||||||
void RequestPermission(
|
void RequestPermission(
|
||||||
content::PermissionType permission,
|
content::PermissionType permission,
|
||||||
const base::Callback<void(bool)>& callback,
|
const base::Callback<void(bool)>& callback,
|
||||||
bool user_gesture = false);
|
bool user_gesture = false,
|
||||||
void RequestPermissionWithDetails(
|
const base::DictionaryValue* details = nullptr);
|
||||||
content::PermissionType permission,
|
|
||||||
const base::Callback<void(bool)>& callback,
|
|
||||||
bool user_gesture,
|
|
||||||
const base::DictionaryValue* details);
|
|
||||||
|
|
||||||
content::WebContents* web_contents_;
|
content::WebContents* web_contents_;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue