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

Side by Side Diff: content/public/browser/tracing_controller.h

Issue 127703002: Add a mechanism to let TracingController invoke JavaScript via TracingUI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | « content/browser/tracing/tracing_ui.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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 CONTENT_PUBLIC_BROWSER_TRACING_CONTROLLER_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_TRACING_CONTROLLER_H_
6 #define CONTENT_PUBLIC_BROWSER_TRACING_CONTROLLER_H_ 6 #define CONTENT_PUBLIC_BROWSER_TRACING_CONTROLLER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
13 13
14 namespace base { 14 namespace base {
15 class FilePath; 15 class FilePath;
16 }; 16 };
17 17
18 namespace content { 18 namespace content {
19 19
20 class TracingController; 20 class TracingController;
21 class TracingUI;
21 22
22 // TracingController is used on the browser processes to enable/disable 23 // TracingController is used on the browser processes to enable/disable
23 // trace status and collect trace data. Only the browser UI thread is allowed 24 // trace status and collect trace data. Only the browser UI thread is allowed
24 // to interact with the TracingController object. All callbacks are called on 25 // to interact with the TracingController object. All callbacks are called on
25 // the UI thread. 26 // the UI thread.
26 class TracingController { 27 class TracingController {
27 public: 28 public:
28 enum Options { 29 enum Options {
29 DEFAULT_OPTIONS = 0, 30 DEFAULT_OPTIONS = 0,
30 ENABLE_SYSTRACE = 1 << 0, 31 ENABLE_SYSTRACE = 1 << 0,
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 // process. 155 // process.
155 typedef base::Callback<void()> WatchEventCallback; 156 typedef base::Callback<void()> WatchEventCallback;
156 virtual bool SetWatchEvent(const std::string& category_name, 157 virtual bool SetWatchEvent(const std::string& category_name,
157 const std::string& event_name, 158 const std::string& event_name,
158 const WatchEventCallback& callback) = 0; 159 const WatchEventCallback& callback) = 0;
159 160
160 // Cancel the watch event. If tracing is enabled, this may race with the 161 // Cancel the watch event. If tracing is enabled, this may race with the
161 // watch event callback. 162 // watch event callback.
162 virtual bool CancelWatchEvent() = 0; 163 virtual bool CancelWatchEvent() = 0;
163 164
165 // Register/Unregister tracing UI that is using this TracingController.
166 virtual void RegisterTracingUI(TracingUI* tracing_ui) = 0;
jam 2014/01/09 18:11:45 since these are methods called internally from con
haraken 2014/01/10 01:02:38 Thanks, removed from public APIs.
167 virtual void UnregisterTracingUI(TracingUI* tracing_ui) = 0;
168
164 protected: 169 protected:
165 virtual ~TracingController() {} 170 virtual ~TracingController() {}
166 }; 171 };
167 172
168 } // namespace content 173 } // namespace content
169 174
170 #endif // CONTENT_PUBLIC_BROWSER_TRACING_CONTROLLER_H_ 175 #endif // CONTENT_PUBLIC_BROWSER_TRACING_CONTROLLER_H_
OLDNEW
« no previous file with comments | « content/browser/tracing/tracing_ui.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698