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/devtools_events_logger.h

Issue 2743013002: Add webdriver endpoint to send custom debugger commands (Closed)
Patch Set: New DevToolsEventsLogger Created 3 years, 9 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
(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_DEVTOOLS_EVENTS_LOGGER_H_
6 #define CHROME_TEST_CHROMEDRIVER_DEVTOOLS_EVENTS_LOGGER_H_
7
8 #include <string>
9 #include <unordered_set>
10
11 #include "base/compiler_specific.h"
12 #include "base/macros.h"
13 #include "chrome/test/chromedriver/base_logger.h"
14 #include "chrome/test/chromedriver/chrome/devtools_event_listener.h"
15 #include "chrome/test/chromedriver/chrome/status.h"
16
17 // Collects DevTools events into Log messages with info level.
18 //
19 // The message is a JSON string of the following structure:
20 // {
21 // "webview": <originating WebView ID>,
22 // "message": { "method": "...", "params": { ... }} // DevTools message.
23 // }
24
25 class DevToolsEventsLogger : public BaseLogger, public DevToolsEventListener {
26 public:
27 // Creates a |DevToolsEventsLogger| with specific preferences.
28 DevToolsEventsLogger(Log* log, const base::ListValue* prefs);
29
30 ~DevToolsEventsLogger() override;
31
32 Status OnConnected(DevToolsClient* client) override;
33
34 Status OnEvent(DevToolsClient* client,
35 const std::string& method,
36 const base::DictionaryValue& params) override;
37
38 private:
39 const base::ListValue* prefs_;
40 std::unordered_set<std::string> events_;
41
42 DISALLOW_COPY_AND_ASSIGN(DevToolsEventsLogger);
43 };
44
45 #endif // CHROME_TEST_CHROMEDRIVER_DEVTOOLS_EVENTS_LOGGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698