OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/test/chromedriver/chrome/debugger_tracker.h" | 5 #include "chrome/test/chromedriver/chrome/debugger_tracker.h" |
6 | 6 |
7 #include "base/strings/stringprintf.h" | |
8 #include "base/values.h" | 7 #include "base/values.h" |
9 #include "chrome/test/chromedriver/chrome/devtools_client.h" | 8 #include "chrome/test/chromedriver/chrome/devtools_client.h" |
10 #include "chrome/test/chromedriver/chrome/status.h" | 9 #include "chrome/test/chromedriver/chrome/status.h" |
11 | 10 |
12 DebuggerTracker::DebuggerTracker(DevToolsClient* client) { | 11 DebuggerTracker::DebuggerTracker(DevToolsClient* client) { |
13 client->AddListener(this); | 12 client->AddListener(this); |
14 } | 13 } |
15 | 14 |
16 DebuggerTracker::~DebuggerTracker() {} | 15 DebuggerTracker::~DebuggerTracker() {} |
17 | 16 |
18 Status DebuggerTracker::OnEvent(DevToolsClient* client, | 17 Status DebuggerTracker::OnEvent(DevToolsClient* client, |
19 const std::string& method, | 18 const std::string& method, |
20 const base::DictionaryValue& params) { | 19 const base::DictionaryValue& params) { |
21 if (method == "Debugger.paused") { | 20 if (method == "Debugger.paused") { |
22 base::DictionaryValue empty_params; | 21 base::DictionaryValue empty_params; |
23 return client->SendCommand("Debugger.resume", empty_params); | 22 return client->SendCommand("Debugger.resume", empty_params); |
24 } | 23 } |
25 return Status(kOk); | 24 return Status(kOk); |
26 } | 25 } |
OLD | NEW |