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

Side by Side Diff: trunk/src/chrome/test/chromedriver/performance_logger.h

Issue 392623005: Revert 283003 "[ChromeDriver] Subscribe PerformanceLogger to Com..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_TEST_CHROMEDRIVER_PERFORMANCE_LOGGER_H_
6 #define CHROME_TEST_CHROMEDRIVER_PERFORMANCE_LOGGER_H_
7
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "chrome/test/chromedriver/chrome/devtools_event_listener.h"
11 #include "chrome/test/chromedriver/command_listener.h"
12
13 class Log;
14
15 // Translates DevTools profiler events into Log messages with info level.
16 //
17 // The message is a JSON string of the following structure:
18 // {
19 // "webview": <originating WebView ID>,
20 // "message": { "method": "...", "params": { ... }} // DevTools message.
21 // }
22 class PerformanceLogger : public DevToolsEventListener, public CommandListener {
23 public:
24 // Creates a PerformanceLogger that creates entries in the given Log object.
25 // The log is owned elsewhere and must not be null.
26 explicit PerformanceLogger(Log* log);
27
28 // Enables Page,Network,Timeline events for client, which must not be null.
29 virtual Status OnConnected(DevToolsClient* client) OVERRIDE;
30 // Translates an event into a log entry.
31 virtual Status OnEvent(DevToolsClient* client,
32 const std::string& method,
33 const base::DictionaryValue& params) OVERRIDE;
34
35 virtual Status BeforeCommand(const std::string& command_name) OVERRIDE;
36
37 private:
38 Log* log_; // The log where to create entries.
39
40 DISALLOW_COPY_AND_ASSIGN(PerformanceLogger);
41 };
42
43 #endif // CHROME_TEST_CHROMEDRIVER_PERFORMANCE_LOGGER_H_
OLDNEW
« no previous file with comments | « trunk/src/chrome/test/chromedriver/logging_unittest.cc ('k') | trunk/src/chrome/test/chromedriver/performance_logger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698