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

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

Issue 275193003: [ChromeDriver] Expose CPU Profiling DevTools API into chromeWebDriver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing web_view_stub method signatuer Created 6 years, 7 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
« no previous file with comments | « chrome/test/chromedriver/chrome/web_view_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/window_commands.h" 5 #include "chrome/test/chromedriver/window_commands.h"
6 6
7 #include <list> 7 #include <list>
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 Status ExecuteExecuteScript( 250 Status ExecuteExecuteScript(
251 Session* session, 251 Session* session,
252 WebView* web_view, 252 WebView* web_view,
253 const base::DictionaryValue& params, 253 const base::DictionaryValue& params,
254 scoped_ptr<base::Value>* value) { 254 scoped_ptr<base::Value>* value) {
255 std::string script; 255 std::string script;
256 if (!params.GetString("script", &script)) 256 if (!params.GetString("script", &script))
257 return Status(kUnknownError, "'script' must be a string"); 257 return Status(kUnknownError, "'script' must be a string");
258 if (script == ":takeHeapSnapshot") { 258 if (script == ":takeHeapSnapshot") {
259 return web_view->TakeHeapSnapshot(value); 259 return web_view->TakeHeapSnapshot(value);
260 } else if (script == ":startProfile") {
261 return web_view->StartProfile();
262 } else if (script == ":endProfile") {
263 return web_view->EndProfile(value);
260 } else { 264 } else {
261 const base::ListValue* args; 265 const base::ListValue* args;
262 if (!params.GetList("args", &args)) 266 if (!params.GetList("args", &args))
263 return Status(kUnknownError, "'args' must be a list"); 267 return Status(kUnknownError, "'args' must be a list");
264 268
265 return web_view->CallFunction(session->GetCurrentFrameId(), 269 return web_view->CallFunction(session->GetCurrentFrameId(),
266 "function(){" + script + "}", *args, value); 270 "function(){" + script + "}", *args, value);
267 } 271 }
268 } 272 }
269 273
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 return status; 877 return status;
874 } 878 }
875 879
876 Status ExecuteTakeHeapSnapshot( 880 Status ExecuteTakeHeapSnapshot(
877 Session* session, 881 Session* session,
878 WebView* web_view, 882 WebView* web_view,
879 const base::DictionaryValue& params, 883 const base::DictionaryValue& params,
880 scoped_ptr<base::Value>* value) { 884 scoped_ptr<base::Value>* value) {
881 return web_view->TakeHeapSnapshot(value); 885 return web_view->TakeHeapSnapshot(value);
882 } 886 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/chrome/web_view_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698