Battery Status API: add UMA logging for Linux.
[chromium-blink-merge.git] / content / browser / tracing / tracing_ui.h
blobb0afde0f309fc417b161addf465b0eb088d82a2f
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_UI_H_
6 #define CONTENT_BROWSER_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 // The C++ back-end for the chrome://tracing webui page.
17 class CONTENT_EXPORT TracingUI : public WebUIController {
18 public:
19 explicit TracingUI(WebUI* web_ui);
20 virtual ~TracingUI();
21 void OnMonitoringStateChanged(bool is_monitoring);
22 void DoUpload(const base::ListValue* args);
23 void OnTraceUploadProgress(int64 current, int64 total);
24 void OnTraceUploadComplete(bool success,
25 const std::string& report_id,
26 const std::string& error_message);
28 private:
29 base::WeakPtrFactory<TracingUI> weak_factory_;
31 DISALLOW_COPY_AND_ASSIGN(TracingUI);
34 } // namespace content
36 #endif // CONTENT_BROWSER_TRACING_UI_H_