| // Copyright 2017 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| #include "content/browser/devtools/protocol/browser_handler.h" |
| |
| #include "content/public/browser/devtools_agent_host.h" |
| #include "content/public/common/content_client.h" |
| #include "content/public/common/user_agent.h" |
| #include "v8/include/v8-version-string.h" |
| |
| namespace content { |
| namespace protocol { |
| |
| BrowserHandler::BrowserHandler() |
| : DevToolsDomainHandler(Browser::Metainfo::domainName) {} |
| |
| BrowserHandler::~BrowserHandler() {} |
| |
| void BrowserHandler::Wire(UberDispatcher* dispatcher) { |
| Browser::Dispatcher::wire(dispatcher, this); |
| } |
| |
| Response BrowserHandler::GetVersion(std::string* protocol_version, |
| std::string* product, |
| std::string* revision, |
| std::string* user_agent, |
| std::string* js_version) { |
| *protocol_version = DevToolsAgentHost::GetProtocolVersion(); |
| *revision = GetWebKitRevision(); |
| *product = GetContentClient()->GetProduct(); |
| *user_agent = GetContentClient()->GetUserAgent(); |
| *js_version = V8_VERSION_STRING; |
| return Response::OK(); |
| } |
| |
| } // namespace protocol |
| } // namespace content |