OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/command_executor_impl.h" | 5 #include "chrome/test/chromedriver/command_executor_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/message_loop_proxy.h" | 10 #include "base/message_loop_proxy.h" |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 session_command_map[CommandNames::kGetWindowPosition] = | 221 session_command_map[CommandNames::kGetWindowPosition] = |
222 base::Bind(&ExecuteGetWindowPosition); | 222 base::Bind(&ExecuteGetWindowPosition); |
223 session_command_map[CommandNames::kSetWindowPosition] = | 223 session_command_map[CommandNames::kSetWindowPosition] = |
224 base::Bind(&ExecuteSetWindowPosition); | 224 base::Bind(&ExecuteSetWindowPosition); |
225 session_command_map[CommandNames::kGetWindowSize] = | 225 session_command_map[CommandNames::kGetWindowSize] = |
226 base::Bind(&ExecuteGetWindowSize); | 226 base::Bind(&ExecuteGetWindowSize); |
227 session_command_map[CommandNames::kSetWindowSize] = | 227 session_command_map[CommandNames::kSetWindowSize] = |
228 base::Bind(&ExecuteSetWindowSize); | 228 base::Bind(&ExecuteSetWindowSize); |
229 session_command_map[CommandNames::kMaximizeWindow] = | 229 session_command_map[CommandNames::kMaximizeWindow] = |
230 base::Bind(&ExecuteMaximizeWindow); | 230 base::Bind(&ExecuteMaximizeWindow); |
| 231 session_command_map[CommandNames::kGetAvailableLogTypes] = |
| 232 base::Bind(&ExecuteGetAvailableLogTypes); |
| 233 session_command_map[CommandNames::kGetLog] = |
| 234 base::Bind(&ExecuteGetLog); |
231 | 235 |
232 // Wrap SessionCommand into non-session Command. | 236 // Wrap SessionCommand into non-session Command. |
233 base::Callback<Status( | 237 base::Callback<Status( |
234 const SessionCommand&, | 238 const SessionCommand&, |
235 const base::DictionaryValue&, | 239 const base::DictionaryValue&, |
236 const std::string&, | 240 const std::string&, |
237 scoped_ptr<base::Value>*, | 241 scoped_ptr<base::Value>*, |
238 std::string*)> execute_session_command = base::Bind( | 242 std::string*)> execute_session_command = base::Bind( |
239 &ExecuteSessionCommand, | 243 &ExecuteSessionCommand, |
240 &session_map_); | 244 &session_map_); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 base::SysInfo::OperatingSystemName().c_str(), | 286 base::SysInfo::OperatingSystemName().c_str(), |
283 base::SysInfo::OperatingSystemVersion().c_str(), | 287 base::SysInfo::OperatingSystemVersion().c_str(), |
284 base::SysInfo::OperatingSystemArchitecture().c_str())); | 288 base::SysInfo::OperatingSystemArchitecture().c_str())); |
285 scoped_ptr<base::DictionaryValue> error(new base::DictionaryValue()); | 289 scoped_ptr<base::DictionaryValue> error(new base::DictionaryValue()); |
286 error->SetString("message", status.message()); | 290 error->SetString("message", status.message()); |
287 value->reset(error.release()); | 291 value->reset(error.release()); |
288 } | 292 } |
289 if (!*value) | 293 if (!*value) |
290 value->reset(base::Value::CreateNullValue()); | 294 value->reset(base::Value::CreateNullValue()); |
291 } | 295 } |
OLD | NEW |