| 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/stub_devtools_client.h" | 5 #include "chrome/test/chromedriver/chrome/stub_devtools_client.h" |
| 6 | 6 |
| 7 #include "base/values.h" | 7 #include "base/values.h" |
| 8 #include "chrome/test/chromedriver/chrome/status.h" | 8 #include "chrome/test/chromedriver/chrome/status.h" |
| 9 | 9 |
| 10 StubDevToolsClient::StubDevToolsClient() : id_("stub-id") {} | 10 StubDevToolsClient::StubDevToolsClient() : id_("stub-id") {} |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 return Status(kOk); | 25 return Status(kOk); |
| 26 } | 26 } |
| 27 | 27 |
| 28 Status StubDevToolsClient::SendCommand( | 28 Status StubDevToolsClient::SendCommand( |
| 29 const std::string& method, | 29 const std::string& method, |
| 30 const base::DictionaryValue& params) { | 30 const base::DictionaryValue& params) { |
| 31 std::unique_ptr<base::DictionaryValue> result; | 31 std::unique_ptr<base::DictionaryValue> result; |
| 32 return SendCommandAndGetResult(method, params, &result); | 32 return SendCommandAndGetResult(method, params, &result); |
| 33 } | 33 } |
| 34 | 34 |
| 35 Status StubDevToolsClient::SendCommandWithTimeout( |
| 36 const std::string& method, |
| 37 const base::DictionaryValue& params, |
| 38 const Timeout* timeout) { |
| 39 return SendCommand(method, params); |
| 40 } |
| 41 |
| 35 Status StubDevToolsClient::SendAsyncCommand( | 42 Status StubDevToolsClient::SendAsyncCommand( |
| 36 const std::string& method, | 43 const std::string& method, |
| 37 const base::DictionaryValue& params) { | 44 const base::DictionaryValue& params) { |
| 38 return SendCommand(method, params); | 45 return SendCommand(method, params); |
| 39 } | 46 } |
| 40 | 47 |
| 41 Status StubDevToolsClient::SendCommandAndGetResult( | 48 Status StubDevToolsClient::SendCommandAndGetResult( |
| 42 const std::string& method, | 49 const std::string& method, |
| 43 const base::DictionaryValue& params, | 50 const base::DictionaryValue& params, |
| 44 std::unique_ptr<base::DictionaryValue>* result) { | 51 std::unique_ptr<base::DictionaryValue>* result) { |
| 45 result->reset(new base::DictionaryValue()); | 52 result->reset(new base::DictionaryValue()); |
| 46 return Status(kOk); | 53 return Status(kOk); |
| 47 } | 54 } |
| 48 | 55 |
| 56 Status StubDevToolsClient::SendCommandAndGetResultWithTimeout( |
| 57 const std::string& method, |
| 58 const base::DictionaryValue& params, |
| 59 const Timeout* timeout, |
| 60 std::unique_ptr<base::DictionaryValue>* result) { |
| 61 return SendCommandAndGetResult(method, params, result); |
| 62 } |
| 63 |
| 49 void StubDevToolsClient::AddListener(DevToolsEventListener* listener) { | 64 void StubDevToolsClient::AddListener(DevToolsEventListener* listener) { |
| 50 listeners_.push_back(listener); | 65 listeners_.push_back(listener); |
| 51 } | 66 } |
| 52 | 67 |
| 53 Status StubDevToolsClient::HandleEventsUntil( | 68 Status StubDevToolsClient::HandleEventsUntil( |
| 54 const ConditionalFunc& conditional_func, | 69 const ConditionalFunc& conditional_func, |
| 55 const base::TimeDelta& timeout) { | 70 const Timeout& timeout) { |
| 56 return Status(kOk); | 71 return Status(kOk); |
| 57 } | 72 } |
| 58 | 73 |
| 59 Status StubDevToolsClient::HandleReceivedEvents() { | 74 Status StubDevToolsClient::HandleReceivedEvents() { |
| 60 return Status(kOk); | 75 return Status(kOk); |
| 61 } | 76 } |
| OLD | NEW |