Merge pull request #5147 from deepak1556/devtools_network_controller_patch
session: set client id when enabling network emulation
This commit is contained in:
commit
8ca1a6961c
3 changed files with 30 additions and 1 deletions
|
@ -386,12 +386,16 @@ void Session::EnableNetworkEmulation(const mate::Dictionary& options) {
|
|||
|
||||
browser_context_->network_controller_handle()->SetNetworkState(
|
||||
devtools_network_emulation_client_id_, std::move(conditions));
|
||||
browser_context_->network_delegate()->SetDevToolsNetworkEmulationClientId(
|
||||
devtools_network_emulation_client_id_);
|
||||
}
|
||||
|
||||
void Session::DisableNetworkEmulation() {
|
||||
scoped_ptr<brightray::DevToolsNetworkConditions> conditions;
|
||||
browser_context_->network_controller_handle()->SetNetworkState(
|
||||
devtools_network_emulation_client_id_, std::move(conditions));
|
||||
browser_context_->network_delegate()->SetDevToolsNetworkEmulationClientId(
|
||||
std::string());
|
||||
}
|
||||
|
||||
void Session::SetCertVerifyProc(v8::Local<v8::Value> val,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue