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

Side by Side Diff: content/shell/renderer/ipc_echo.h

Issue 478483005: Add IPC benchmarking API to Blink TestRunner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Landing Created 6 years, 4 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 2013 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 CONTENT_SHELL_IPC_ECHO_H_
6 #define CONTENT_SHELL_IPC_ECHO_H_
7
8 #include <utility>
9 #include <vector>
10 #include "base/compiler_specific.h"
11 #include "third_party/WebKit/public/web/WebDocument.h"
12
13 namespace IPC {
14 class Sender;
15 }
16
17 namespace content {
18
19 // This class is for writing micro benchmarks exercising underlying
20 // IPC::Channel using HTML and JavaScript.
21 //
22 // TODO(morrita): The benchmark effort tries to makesure that
23 // IPC::ChannelMojo is as performant as native IPC::Channel
24 // implementations. Currently IPC::ChannelMojo is hidden behind
25 // "--enable-renderer-mojo-channel". Once it is turned on by default.
26 // we no longer need this class and should remove it.
27 class IPCEcho {
28 public:
29 IPCEcho(blink::WebDocument document, IPC::Sender* sender, int routing_id);
30
31 void RequestEcho(int id, int size);
32 void DidRespondEcho(int id, int size);
33
34 int last_echo_id() const { return last_echo_id_; }
35 int last_echo_size() const { return last_echo_size_; }
36
37 blink::WebDocument document_;
38 IPC::Sender* sender_;
39 int routing_id_;
40 int last_echo_id_;
41 int last_echo_size_;
42 };
43
44 } // namespace content
45
46 #endif // CONTENT_SHELL_IPC_ECHO_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698