Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Side by Side Diff: chrome/browser/devtools/chrome_devtools_manager_delegate.cc

Issue 290873002: DevTools: allow embedder handling remote debugger commands. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_protocol.h"
7 #include "chrome/browser/devtools/devtools_window.h" 8 #include "chrome/browser/devtools/devtools_window.h"
8 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
9 #include "content/public/browser/devtools_agent_host.h" 10 #include "content/public/browser/devtools_agent_host.h"
10 11
11 ChromeDevToolsManagerDelegate::ChromeDevToolsManagerDelegate() { 12 ChromeDevToolsManagerDelegate::ChromeDevToolsManagerDelegate() {
12 } 13 }
13 14
14 ChromeDevToolsManagerDelegate::~ChromeDevToolsManagerDelegate() { 15 ChromeDevToolsManagerDelegate::~ChromeDevToolsManagerDelegate() {
15 } 16 }
16 17
17 void ChromeDevToolsManagerDelegate::Inspect( 18 void ChromeDevToolsManagerDelegate::Inspect(
18 content::BrowserContext* browser_context, 19 content::BrowserContext* browser_context,
19 content::DevToolsAgentHost* agent_host) { 20 content::DevToolsAgentHost* agent_host) {
20 if (!agent_host->IsWorker()) { 21 if (!agent_host->IsWorker()) {
21 // TODO(horo): Support other types of DevToolsAgentHost when necessary. 22 // TODO(horo): Support other types of DevToolsAgentHost when necessary.
22 NOTREACHED() << "Inspect() only supports workers."; 23 NOTREACHED() << "Inspect() only supports workers.";
23 } 24 }
24 #if !defined(OS_ANDROID) 25 #if !defined(OS_ANDROID)
25 if (Profile* profile = Profile::FromBrowserContext(browser_context)) 26 if (Profile* profile = Profile::FromBrowserContext(browser_context))
26 DevToolsWindow::OpenDevToolsWindowForWorker(profile, agent_host); 27 DevToolsWindow::OpenDevToolsWindowForWorker(profile, agent_host);
27 #endif 28 #endif
28 } 29 }
30
31 base::DictionaryValue* ChromeDevToolsManagerDelegate::HandleCommand(
32 content::DevToolsAgentHost* agent_host,
33 base::DictionaryValue* command_dict) {
34 scoped_ptr<DevToolsProtocol::Command> command(
pfeldman 2014/05/19 08:48:18 Lets return NULL for now.
eustas 2014/05/19 08:59:26 Done.
35 DevToolsProtocol::ParseCommand(command_dict));
36 if (!command)
37 return NULL;
38 return NULL;
39 }
OLDNEW
« no previous file with comments | « chrome/browser/devtools/chrome_devtools_manager_delegate.h ('k') | chrome/browser/devtools/devtools_protocol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698