Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Side by Side Diff: chrome/test/chromedriver/chrome/automation_extension.cc

Issue 2285933003: Remove more usage of the base::ListValue::Append(Value*) overload. (Closed)
Patch Set: rebase Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <utility> 7 #include <utility>
8 8
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 *x = temp_x; 93 *x = temp_x;
94 *y = temp_y; 94 *y = temp_y;
95 *width = temp_width; 95 *width = temp_width;
96 *height = temp_height; 96 *height = temp_height;
97 return Status(kOk); 97 return Status(kOk);
98 } 98 }
99 99
100 Status AutomationExtension::UpdateWindow( 100 Status AutomationExtension::UpdateWindow(
101 const base::DictionaryValue& update_info) { 101 const base::DictionaryValue& update_info) {
102 base::ListValue args; 102 base::ListValue args;
103 args.Append(update_info.DeepCopy()); 103 args.Append(update_info.CreateDeepCopy());
104 std::unique_ptr<base::Value> result; 104 std::unique_ptr<base::Value> result;
105 return web_view_->CallAsyncFunction(std::string(), 105 return web_view_->CallAsyncFunction(std::string(),
106 "updateWindow", 106 "updateWindow",
107 args, 107 args,
108 base::TimeDelta::FromSeconds(10), 108 base::TimeDelta::FromSeconds(10),
109 &result); 109 &result);
110 } 110 }
111 111
112 Status AutomationExtension::LaunchApp(const std::string& id) { 112 Status AutomationExtension::LaunchApp(const std::string& id) {
113 base::ListValue args; 113 base::ListValue args;
114 args.AppendString(id); 114 args.AppendString(id);
115 std::unique_ptr<base::Value> result; 115 std::unique_ptr<base::Value> result;
116 return web_view_->CallAsyncFunction(std::string(), 116 return web_view_->CallAsyncFunction(std::string(),
117 "launchApp", 117 "launchApp",
118 args, 118 args,
119 base::TimeDelta::FromSeconds(10), 119 base::TimeDelta::FromSeconds(10),
120 &result); 120 &result);
121 } 121 }
OLDNEW
« no previous file with comments | « chrome/test/base/javascript_browser_test.cc ('k') | chrome/test/chromedriver/chrome/web_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698