| Index: components/ui_devtools/devtools_client.cc
|
| diff --git a/components/ui_devtools/devtools_client.cc b/components/ui_devtools/devtools_client.cc
|
| index 94a751ab6894745e7cf938869c13bf0d2fa31ad5..492c021ff28a80fe6a30f90332aa1e0b4dad701f 100644
|
| --- a/components/ui_devtools/devtools_client.cc
|
| +++ b/components/ui_devtools/devtools_client.cc
|
| @@ -25,6 +25,11 @@ void UiDevToolsClient::AddAgent(std::unique_ptr<UiDevToolsAgent> agent) {
|
| agents_.push_back(std::move(agent));
|
| }
|
|
|
| +void UiDevToolsClient::Disconnect() {
|
| + connection_id_ = kNotConnected;
|
| + DisableAllAgents();
|
| +}
|
| +
|
| void UiDevToolsClient::Dispatch(const std::string& data) {
|
| dispatcher_.dispatch(protocol::parseJSON(data));
|
| }
|
| @@ -41,6 +46,11 @@ const std::string& UiDevToolsClient::name() const {
|
| return name_;
|
| }
|
|
|
| +void UiDevToolsClient::DisableAllAgents() {
|
| + for (std::unique_ptr<UiDevToolsAgent>& agent : agents_)
|
| + agent->Disable();
|
| +}
|
| +
|
| void UiDevToolsClient::sendProtocolResponse(int callId, const String& message) {
|
| if (connected())
|
| server_->SendOverWebSocket(connection_id_, message);
|
|
|