| Index: content/browser/devtools/devtools_agent_host_impl.cc
|
| diff --git a/content/browser/devtools/devtools_agent_host_impl.cc b/content/browser/devtools/devtools_agent_host_impl.cc
|
| index fdd38d13c14ca9d1d392da80161aa31ebbc01ad0..109dccd0976b10575a2da8af4ef673ccac31e8f5 100644
|
| --- a/content/browser/devtools/devtools_agent_host_impl.cc
|
| +++ b/content/browser/devtools/devtools_agent_host_impl.cc
|
| @@ -7,6 +7,7 @@
|
| #include <map>
|
| #include <vector>
|
|
|
| +#include "base/guid.h"
|
| #include "base/json/json_writer.h"
|
| #include "base/lazy_instance.h"
|
| #include "content/browser/devtools/devtools_manager.h"
|
| @@ -31,14 +32,6 @@
|
| LAZY_INSTANCE_INITIALIZER;
|
| } // namespace
|
|
|
| -char DevToolsAgentHost::kTypePage[] = "page";
|
| -char DevToolsAgentHost::kTypeFrame[] = "frame";
|
| -char DevToolsAgentHost::kTypeSharedWorker[] = "shared_worker";
|
| -char DevToolsAgentHost::kTypeServiceWorker[] = "service_worker";
|
| -char DevToolsAgentHost::kTypeExternal[] = "external";
|
| -char DevToolsAgentHost::kTypeBrowser[] = "browser";
|
| -char DevToolsAgentHost::kTypeOther[] = "other";
|
| -
|
| // static
|
| std::string DevToolsAgentHost::GetProtocolVersion() {
|
| return std::string(devtools::kProtocolVersion);
|
| @@ -81,11 +74,8 @@
|
| ->GetDevToolsAgentHostForWorker(worker_process_id, worker_route_id);
|
| }
|
|
|
| -DevToolsAgentHostImpl::DevToolsAgentHostImpl(const std::string& id)
|
| - : id_(id),
|
| - session_id_(0),
|
| - description_(""),
|
| - client_(NULL) {
|
| +DevToolsAgentHostImpl::DevToolsAgentHostImpl()
|
| + : id_(base::GenerateGUID()), session_id_(0), client_(NULL) {
|
| DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| g_instances.Get()[id_] = this;
|
| }
|
| @@ -176,27 +166,6 @@
|
| return id_;
|
| }
|
|
|
| -std::string DevToolsAgentHostImpl::GetParentId() {
|
| - return "";
|
| -}
|
| -
|
| -std::string DevToolsAgentHostImpl::GetDescription() {
|
| - return description_;
|
| -}
|
| -
|
| -void DevToolsAgentHostImpl::SetDescriptionOverride(
|
| - const std::string& description) {
|
| - description_ = description;
|
| -}
|
| -
|
| -GURL DevToolsAgentHostImpl::GetFaviconURL() {
|
| - return GURL();
|
| -}
|
| -
|
| -base::TimeTicks DevToolsAgentHostImpl::GetLastActivityTime() {
|
| - return base::TimeTicks();
|
| -}
|
| -
|
| BrowserContext* DevToolsAgentHostImpl::GetBrowserContext() {
|
| return nullptr;
|
| }
|
| @@ -209,15 +178,6 @@
|
| }
|
|
|
| void DevToolsAgentHostImpl::ConnectWebContents(WebContents* wc) {
|
| -}
|
| -
|
| -bool DevToolsAgentHostImpl::Inspect() {
|
| - DevToolsManager* manager = DevToolsManager::GetInstance();
|
| - if (manager->delegate()) {
|
| - manager->delegate()->Inspect(this);
|
| - return true;
|
| - }
|
| - return false;
|
| }
|
|
|
| void DevToolsAgentHostImpl::SendProtocolResponse(int session_id,
|
| @@ -306,6 +266,15 @@
|
| (*it)->Run(agent_host, attached);
|
| }
|
|
|
| +bool DevToolsAgentHostImpl::Inspect(BrowserContext* browser_context) {
|
| + DevToolsManager* manager = DevToolsManager::GetInstance();
|
| + if (manager->delegate()) {
|
| + manager->delegate()->Inspect(browser_context, this);
|
| + return true;
|
| + }
|
| + return false;
|
| +}
|
| +
|
| // DevToolsMessageChunkProcessor -----------------------------------------------
|
|
|
| DevToolsMessageChunkProcessor::DevToolsMessageChunkProcessor(
|
|
|