| 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/automation_extension.h" | 5 #include "chrome/test/chromedriver/chrome/automation_extension.h" |
| 6 | 6 |
| 7 #include "base/time/time.h" | 7 #include "base/time/time.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "chrome/test/chromedriver/chrome/status.h" | 9 #include "chrome/test/chromedriver/chrome/status.h" |
| 10 #include "chrome/test/chromedriver/chrome/web_view.h" | 10 #include "chrome/test/chromedriver/chrome/web_view.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 const base::DictionaryValue& update_info) { | 96 const base::DictionaryValue& update_info) { |
| 97 base::ListValue args; | 97 base::ListValue args; |
| 98 args.Append(update_info.DeepCopy()); | 98 args.Append(update_info.DeepCopy()); |
| 99 scoped_ptr<base::Value> result; | 99 scoped_ptr<base::Value> result; |
| 100 return web_view_->CallAsyncFunction(std::string(), | 100 return web_view_->CallAsyncFunction(std::string(), |
| 101 "updateWindow", | 101 "updateWindow", |
| 102 args, | 102 args, |
| 103 base::TimeDelta::FromSeconds(10), | 103 base::TimeDelta::FromSeconds(10), |
| 104 &result); | 104 &result); |
| 105 } | 105 } |
| 106 |
| 107 Status AutomationExtension::LaunchApp(std::string id) { |
| 108 base::ListValue args; |
| 109 args.AppendString(id); |
| 110 scoped_ptr<base::Value> result; |
| 111 return web_view_->CallAsyncFunction(std::string(), |
| 112 "launchApp", |
| 113 args, |
| 114 base::TimeDelta::FromSeconds(10), |
| 115 &result); |
| 116 } |
| OLD | NEW |