Avoid adding a new option to webPreferences

This commit is contained in:
Cheng Zhao 2016-04-14 10:50:07 +09:00
parent 8f0e594007
commit 31eb793fb0
8 changed files with 8 additions and 28 deletions

View file

@ -1127,12 +1127,6 @@ bool WebContents::IsGuest() const {
return type_ == WEB_VIEW;
}
void WebContents::MergeWebPreferences(const base::DictionaryValue& extend) {
WebContentsPreferences* web_preferences =
WebContentsPreferences::FromWebContents(web_contents());
web_preferences->Merge(extend);
}
v8::Local<v8::Value> WebContents::GetWebPreferences(v8::Isolate* isolate) {
WebContentsPreferences* web_preferences =
WebContentsPreferences::FromWebContents(web_contents());
@ -1227,7 +1221,6 @@ void WebContents::BuildPrototype(v8::Isolate* isolate,
.SetMethod("endFrameSubscription", &WebContents::EndFrameSubscription)
.SetMethod("setSize", &WebContents::SetSize)
.SetMethod("isGuest", &WebContents::IsGuest)
.SetMethod("mergeWebPreferences", &WebContents::MergeWebPreferences)
.SetMethod("getWebPreferences", &WebContents::GetWebPreferences)
.SetMethod("getOwnerBrowserWindow", &WebContents::GetOwnerBrowserWindow)
.SetMethod("hasServiceWorker", &WebContents::HasServiceWorker)

View file

@ -144,7 +144,6 @@ class WebContents : public mate::TrackableObject<WebContents>,
WindowOpenDisposition disposition);
// Returns the web preferences of current WebContents.
void MergeWebPreferences(const base::DictionaryValue& extend);
v8::Local<v8::Value> GetWebPreferences(v8::Isolate* isolate);
// Returns the owner window.