OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 MOJO_SPY_SPY_H_ | 5 #ifndef MOJO_SPY_SPY_H_ |
6 #define MOJO_SPY_SPY_H_ | 6 #define MOJO_SPY_SPY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include "base/memory/scoped_ptr.h" | |
10 | |
11 namespace base { | |
12 class Thread; | |
darin (slow to review)
2014/04/29 06:03:58
nit: no indent
cpu_(ooo_6.6-7.5)
2014/04/29 22:31:16
Done.
| |
13 } | |
9 | 14 |
10 namespace mojo { | 15 namespace mojo { |
11 | 16 |
12 class ServiceManager; | 17 class ServiceManager; |
13 | 18 |
19 // mojo::Spy is a troubleshooting and debugging aid. It helps tracking | |
20 // the mojo system core activities like messages, service creation, etc. | |
21 // Very much a work in progress at this time. | |
darin (slow to review)
2014/04/29 06:03:58
nit: I'd probably leave out this last sentence as
cpu_(ooo_6.6-7.5)
2014/04/29 22:31:16
Done.
| |
22 // | |
23 // The |options| parameter in the constructor comes from the command | |
24 // line of the mojo_shell. Which takes --spy=<options>. Each option is | |
25 // separated by ',' and each option is a key+ value pair separated by ':'. | |
26 // | |
27 // For example --spy=port:13333 | |
28 // | |
14 class Spy { | 29 class Spy { |
15 public: | 30 public: |
16 Spy(mojo::ServiceManager* service_manager, const std::string& options); | 31 Spy(mojo::ServiceManager* service_manager, const std::string& options); |
17 ~Spy(); | 32 ~Spy(); |
33 | |
34 private: | |
35 // This thread runs the code that talks to the frontend. | |
36 scoped_ptr<base::Thread> control_thread_; | |
18 }; | 37 }; |
19 | 38 |
20 } // namespace mojo | 39 } // namespace mojo |
21 | 40 |
22 #endif // MOJO_SPY_SPY_H_ | 41 #endif // MOJO_SPY_SPY_H_ |
OLD | NEW |