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

Side by Side Diff: chrome/test/chromedriver/chrome/cpu_profile.h

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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 #ifndef CHROME_TEST_CHROMEDRIVER_CHROME_HEAP_SNAPSHOT_TAKER_H_ 5 #ifndef CHROME_TEST_CHROMEDRIVER_CHROME_CPU_PROFILE_TAKER_H_
6 #define CHROME_TEST_CHROMEDRIVER_CHROME_HEAP_SNAPSHOT_TAKER_H_ 6 #define CHROME_TEST_CHROMEDRIVER_CHROME_CPU_PROFILE_TAKER_H_
7 7
8 #include <string> 8 #include <string>
9 9 #include "base/logging.h"
10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
12 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
13 #include "chrome/test/chromedriver/chrome/devtools_event_listener.h" 12 #include "chrome/test/chromedriver/chrome/devtools_event_listener.h"
13 #include "chrome/test/chromedriver/chrome/status.h"
14 14
15 namespace base { 15 namespace base {
16 class DictionaryValue; 16 class DictionaryValue;
17 class Value; 17 class Value;
18 } 18 }
19 19
20 class DevToolsClient; 20 class DevToolsClient;
21 class Status; 21 class Status;
22 22
23 // Take the heap snapshot. 23 // Take the heap snapshot.
24 class HeapSnapshotTaker: public DevToolsEventListener { 24 class CpuProfile: public DevToolsEventListener {
klm 2014/05/10 02:21:57 I believe the C++ style wants a space before the "
25 public: 25 public:
26 explicit HeapSnapshotTaker(DevToolsClient* client); 26 explicit CpuProfile(DevToolsClient* client);
27 virtual ~HeapSnapshotTaker(); 27 virtual ~CpuProfile();
28 28
29 Status TakeSnapshot(scoped_ptr<base::Value>* snapshot); 29 Status InitProfileInternal();
klm 2014/05/10 02:21:57 These should be private.
30 Status StopProfileInternal();
31 Status StartProfile(scoped_ptr<base::Value>* snapshot);
32 Status EndProfile(scoped_ptr<base::Value>* snapshot);
30 33
31 // Overridden from DevToolsEventListener: 34 // Overridden from DevToolsEventListener:
32 virtual Status OnEvent(DevToolsClient* client, 35 virtual Status OnEvent(DevToolsClient* client,
33 const std::string& method, 36 const std::string& method,
34 const base::DictionaryValue& params) OVERRIDE; 37 const base::DictionaryValue& params) OVERRIDE;
35 38
36 private: 39 private:
37 Status TakeSnapshotInternal(); 40 Status CpuProfileInternal();
klm 2014/05/10 02:21:57 This method seems to have no implementation define
38 41
39 DevToolsClient* client_; 42 DevToolsClient* client_;
40 std::string snapshot_; 43 std::string snapshot_;
41 44
42 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotTaker); 45 DISALLOW_COPY_AND_ASSIGN(CpuProfile);
43 }; 46 };
44 47
45 #endif // CHROME_TEST_CHROMEDRIVER_CHROME_HEAP_SNAPSHOT_TAKER_H_ 48 #endif // CHROME_TEST_CHROMEDRIVER_CHROME_CPU_PROFILE_TAKER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/test/chromedriver/chrome/cpu_profile.cc » ('j') | chrome/test/chromedriver/chrome/cpu_profile.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698