| Index: chrome/browser/devtools/devtools_manager_delegate_impl.cc
|
| diff --git a/chrome/browser/devtools/devtools_manager_delegate_impl.cc b/chrome/browser/devtools/devtools_manager_delegate_impl.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..5bc50985d7044e02e583e804a455f9d0e5c7aaa9
|
| --- /dev/null
|
| +++ b/chrome/browser/devtools/devtools_manager_delegate_impl.cc
|
| @@ -0,0 +1,26 @@
|
| +// Copyright 2014 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 "chrome/browser/devtools/devtools_manager_delegate_impl.h"
|
| +
|
| +#include "chrome/browser/devtools/devtools_window.h"
|
| +#include "chrome/browser/profiles/profile.h"
|
| +#include "content/public/browser/devtools_agent_host.h"
|
| +
|
| +DevToolsManagerDelegateImpl::DevToolsManagerDelegateImpl() {
|
| +}
|
| +
|
| +DevToolsManagerDelegateImpl::~DevToolsManagerDelegateImpl() {
|
| +}
|
| +
|
| +void DevToolsManagerDelegateImpl::Inspect(
|
| + content::BrowserContext* browser_context,
|
| + content::DevToolsAgentHost* agent_host) {
|
| + if (!agent_host->IsWorker()) {
|
| + // TODO(horo): Support other types of DevToolsAgentHost when necessary.
|
| + NOTREACHED() << "Inspect() only supports workers.";
|
| + }
|
| + if (Profile* profile = Profile::FromBrowserContext(browser_context))
|
| + DevToolsWindow::OpenDevToolsWindowForWorker(profile, agent_host);
|
| +}
|
|
|