| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/webdriver/webdriver_session.h" | 5 #include "chrome/test/webdriver/webdriver_session.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 990 if (!automation_.get()) | 990 if (!automation_.get()) |
| 991 return NULL; | 991 return NULL; |
| 992 Error* error = NULL; | 992 Error* error = NULL; |
| 993 RunSessionTask(NewRunnableMethod( | 993 RunSessionTask(NewRunnableMethod( |
| 994 automation_.get(), | 994 automation_.get(), |
| 995 &Automation::WaitForAllTabsToStopLoading, | 995 &Automation::WaitForAllTabsToStopLoading, |
| 996 &error)); | 996 &error)); |
| 997 return error; | 997 return error; |
| 998 } | 998 } |
| 999 | 999 |
| 1000 Error* Session::InstallExtension(const FilePath& path) { | 1000 Error* Session::InstallExtensionDeprecated(const FilePath& path) { |
| 1001 Error* error = NULL; |
| 1002 RunSessionTask(NewRunnableMethod( |
| 1003 automation_.get(), |
| 1004 &Automation::InstallExtensionDeprecated, |
| 1005 path, |
| 1006 &error)); |
| 1007 return error; |
| 1008 } |
| 1009 |
| 1010 Error* Session::GetInstalledExtensions( |
| 1011 std::vector<std::string>* extension_ids) { |
| 1012 Error* error = NULL; |
| 1013 RunSessionTask(NewRunnableMethod( |
| 1014 automation_.get(), |
| 1015 &Automation::GetInstalledExtensions, |
| 1016 extension_ids, |
| 1017 &error)); |
| 1018 return error; |
| 1019 } |
| 1020 |
| 1021 Error* Session::InstallExtension( |
| 1022 const FilePath& path, std::string* extension_id) { |
| 1001 Error* error = NULL; | 1023 Error* error = NULL; |
| 1002 RunSessionTask(NewRunnableMethod( | 1024 RunSessionTask(NewRunnableMethod( |
| 1003 automation_.get(), | 1025 automation_.get(), |
| 1004 &Automation::InstallExtension, | 1026 &Automation::InstallExtension, |
| 1005 path, | 1027 path, |
| 1028 extension_id, |
| 1006 &error)); | 1029 &error)); |
| 1007 return error; | 1030 return error; |
| 1008 } | 1031 } |
| 1009 | 1032 |
| 1010 const std::string& Session::id() const { | 1033 const std::string& Session::id() const { |
| 1011 return id_; | 1034 return id_; |
| 1012 } | 1035 } |
| 1013 | 1036 |
| 1014 const FrameId& Session::current_target() const { | 1037 const FrameId& Session::current_target() const { |
| 1015 return current_target_; | 1038 return current_target_; |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1430 Error* Session::GetAppCacheStatus(int* status) { | 1453 Error* Session::GetAppCacheStatus(int* status) { |
| 1431 return ExecuteScriptAndParse( | 1454 return ExecuteScriptAndParse( |
| 1432 current_target_, | 1455 current_target_, |
| 1433 atoms::asString(atoms::GET_APPCACHE_STATUS), | 1456 atoms::asString(atoms::GET_APPCACHE_STATUS), |
| 1434 "getAppcacheStatus", | 1457 "getAppcacheStatus", |
| 1435 new ListValue(), | 1458 new ListValue(), |
| 1436 CreateDirectValueParser(status)); | 1459 CreateDirectValueParser(status)); |
| 1437 } | 1460 } |
| 1438 | 1461 |
| 1439 } // namespace webdriver | 1462 } // namespace webdriver |
| OLD | NEW |