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

Unified Diff: chrome/test/chromedriver/chrome/web_view_impl.cc

Issue 275193003: [ChromeDriver] Expose CPU Profiling DevTools API into chromeWebDriver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/chromedriver/chrome/web_view_impl.cc
diff --git a/chrome/test/chromedriver/chrome/web_view_impl.cc b/chrome/test/chromedriver/chrome/web_view_impl.cc
index 37e987a50983430de6891dbd62bc20b551a1cd70..4351cdddc6a8dfd50a6d4159ee46be5dd803a8d8 100644
--- a/chrome/test/chromedriver/chrome/web_view_impl.cc
+++ b/chrome/test/chromedriver/chrome/web_view_impl.cc
@@ -19,6 +19,7 @@
#include "chrome/test/chromedriver/chrome/frame_tracker.h"
#include "chrome/test/chromedriver/chrome/geolocation_override_manager.h"
#include "chrome/test/chromedriver/chrome/heap_snapshot_taker.h"
+#include "chrome/test/chromedriver/chrome/cpu_profile.h"
#include "chrome/test/chromedriver/chrome/javascript_dialog_manager.h"
#include "chrome/test/chromedriver/chrome/js.h"
#include "chrome/test/chromedriver/chrome/navigation_tracker.h"
@@ -123,6 +124,7 @@ WebViewImpl::WebViewImpl(const std::string& id,
geolocation_override_manager_(
new GeolocationOverrideManager(client.get())),
heap_snapshot_taker_(new HeapSnapshotTaker(client.get())),
+ cpu_profile_(new CpuProfile(client.get())),
debugger_(new DebuggerTracker(client.get())),
client_(client.release()) {}
@@ -420,6 +422,14 @@ Status WebViewImpl::TakeHeapSnapshot(scoped_ptr<base::Value>* snapshot) {
return heap_snapshot_taker_->TakeSnapshot(snapshot);
}
+Status WebViewImpl::StartProfile(scoped_ptr<base::Value>* result) {
+ return cpu_profile_->StartProfile(result);
+}
+
+Status WebViewImpl::EndProfile(scoped_ptr<base::Value>* result) {
+ return cpu_profile_->EndProfile(result);
+}
+
Status WebViewImpl::CallAsyncFunctionInternal(const std::string& frame,
const std::string& function,
const base::ListValue& args,

Powered by Google App Engine
This is Rietveld 408576698