Supervised user import: Listen for profile creation/deletion
[chromium-blink-merge.git] / content / browser / tracing / tracing_ui.h
blob4378154d36c0b0bddf598a055d671e588668fd0e
1 // Copyright (c) 2011 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.
5 #ifndef CONTENT_BROWSER_TRACING_TRACING_UI_H_
6 #define CONTENT_BROWSER_TRACING_TRACING_UI_H_
8 #include <map>
9 #include <string>
11 #include "base/memory/weak_ptr.h"
12 #include "content/public/browser/web_ui_controller.h"
14 namespace content {
16 class TraceUploader;
17 class TracingDelegate;
19 // The C++ back-end for the chrome://tracing webui page.
20 class CONTENT_EXPORT TracingUI : public WebUIController {
21 public:
22 explicit TracingUI(WebUI* web_ui);
23 ~TracingUI() override;
24 void OnMonitoringStateChanged(bool is_monitoring);
25 void DoUpload(const base::ListValue* args);
26 void OnTraceUploadProgress(int64 current, int64 total);
27 void OnTraceUploadComplete(bool success, const std::string& feedback);
29 private:
30 scoped_ptr<TracingDelegate> delegate_;
31 scoped_ptr<TraceUploader> trace_uploader_;
32 base::WeakPtrFactory<TracingUI> weak_factory_;
34 DISALLOW_COPY_AND_ASSIGN(TracingUI);
37 } // namespace content
39 #endif // CONTENT_BROWSER_TRACING_TRACING_UI_H_