OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/devtools/chrome_devtools_manager_delegate.h" | 5 #include "chrome/browser/devtools/chrome_devtools_manager_delegate.h" |
6 | 6 |
7 #include "chrome/browser/devtools/devtools_window.h" | 7 #include "chrome/browser/devtools/devtools_window.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "content/public/browser/devtools_agent_host.h" | 9 #include "content/public/browser/devtools_agent_host.h" |
10 | 10 |
11 ChromeDevToolsManagerDelegate::ChromeDevToolsManagerDelegate() { | 11 ChromeDevToolsManagerDelegate::ChromeDevToolsManagerDelegate() { |
12 } | 12 } |
13 | 13 |
14 ChromeDevToolsManagerDelegate::~ChromeDevToolsManagerDelegate() { | 14 ChromeDevToolsManagerDelegate::~ChromeDevToolsManagerDelegate() { |
15 } | 15 } |
16 | 16 |
17 void ChromeDevToolsManagerDelegate::Inspect( | 17 void ChromeDevToolsManagerDelegate::Inspect( |
18 content::BrowserContext* browser_context, | 18 content::BrowserContext* browser_context, |
19 content::DevToolsAgentHost* agent_host) { | 19 content::DevToolsAgentHost* agent_host) { |
20 if (!agent_host->IsWorker()) { | 20 if (!agent_host->IsWorker()) { |
21 // TODO(horo): Support other types of DevToolsAgentHost when necessary. | 21 // TODO(horo): Support other types of DevToolsAgentHost when necessary. |
22 NOTREACHED() << "Inspect() only supports workers."; | 22 NOTREACHED() << "Inspect() only supports workers."; |
23 } | 23 } |
24 #if !defined(OS_ANDROID) | 24 #if !defined(OS_ANDROID) |
25 if (Profile* profile = Profile::FromBrowserContext(browser_context)) | 25 if (Profile* profile = Profile::FromBrowserContext(browser_context)) |
26 DevToolsWindow::OpenDevToolsWindowForWorker(profile, agent_host); | 26 DevToolsWindow::OpenDevToolsWindowForWorker(profile, agent_host); |
27 #endif | 27 #endif |
28 } | 28 } |
| 29 |
| 30 base::DictionaryValue* ChromeDevToolsManagerDelegate::HandleCommand( |
| 31 content::DevToolsAgentHost* agent_host, |
| 32 base::DictionaryValue* command_dict) { |
| 33 return NULL; |
| 34 } |
OLD | NEW |