mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium revision 1ae106db (#414607)
This commit is contained in:
@@ -320,6 +320,21 @@ void CefDevToolsFrontend::DispatchProtocolMessage(
|
||||
}
|
||||
}
|
||||
|
||||
void CefDevToolsFrontend::SetPreferences(const std::string& json) {
|
||||
preferences_.Clear();
|
||||
if (json.empty())
|
||||
return;
|
||||
base::DictionaryValue* dict = nullptr;
|
||||
std::unique_ptr<base::Value> parsed = base::JSONReader::Read(json);
|
||||
if (!parsed || !parsed->GetAsDictionary(&dict))
|
||||
return;
|
||||
for (base::DictionaryValue::Iterator it(*dict); !it.IsAtEnd(); it.Advance()) {
|
||||
if (!it.value().IsType(base::Value::TYPE_STRING))
|
||||
continue;
|
||||
preferences_.SetWithoutPathExpansion(it.key(), it.value().CreateDeepCopy());
|
||||
}
|
||||
}
|
||||
|
||||
void CefDevToolsFrontend::OnURLFetchComplete(const net::URLFetcher* source) {
|
||||
// TODO(pfeldman): this is a copy of chrome's devtools_ui_bindings.cc.
|
||||
// We should handle some of the commands including this one in content.
|
||||
|
Reference in New Issue
Block a user