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

Side by Side Diff: mojo/spy/spy.h

Issue 284743002: Adding a mojo interface to the mojo spy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clang 2 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 | Annotate | Revision Log
« no previous file with comments | « mojo/spy/public/spy.mojom ('k') | mojo/spy/spy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
10 11
11 namespace base { 12 namespace base {
12 class Thread; 13 class Thread;
13 } 14 }
14 15
15 namespace mojo { 16 namespace mojo {
16 17
17 class ServiceManager; 18 class ServiceManager;
19 class SpyServerImpl;
18 20
19 // mojo::Spy is a troubleshooting and debugging aid. It helps tracking 21 // mojo::Spy is a troubleshooting and debugging aid. It helps tracking
20 // the mojo system core activities like messages, service creation, etc. 22 // the mojo system core activities like messages, service creation, etc.
21 // 23 //
22 // The |options| parameter in the constructor comes from the command 24 // The |options| parameter in the constructor comes from the command
23 // line of the mojo_shell. Which takes --spy=<options>. Each option is 25 // line of the mojo_shell. Which takes --spy=<options>. Each option is
24 // separated by ',' and each option is a key+ value pair separated by ':'. 26 // separated by ',' and each option is a key+ value pair separated by ':'.
25 // 27 //
26 // For example --spy=port:13333 28 // For example --spy=port:13333
27 // 29 //
28 class Spy { 30 class Spy {
29 public: 31 public:
30 Spy(mojo::ServiceManager* service_manager, const std::string& options); 32 Spy(mojo::ServiceManager* service_manager, const std::string& options);
31 ~Spy(); 33 ~Spy();
32 34
33 private: 35 private:
34 // This thread runs the code that talks to the frontend. 36 scoped_refptr<SpyServerImpl> spy_server_;
35 scoped_ptr<base::Thread> control_thread_; 37 // This thread runs the code that talks to the frontend.
38 scoped_ptr<base::Thread> control_thread_;
36 }; 39 };
37 40
38 } // namespace mojo 41 } // namespace mojo
39 42
40 #endif // MOJO_SPY_SPY_H_ 43 #endif // MOJO_SPY_SPY_H_
OLDNEW
« no previous file with comments | « mojo/spy/public/spy.mojom ('k') | mojo/spy/spy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698