| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_UI_WEBUI_PERFORMANCE_MONITOR_WEB_UI_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_PERFORMANCE_MONITOR_WEB_UI_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_PERFORMANCE_MONITOR_WEB_UI_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_PERFORMANCE_MONITOR_WEB_UI_HANDLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 virtual ~WebUIHandler(); | 29 virtual ~WebUIHandler(); |
| 30 | 30 |
| 31 // WebUIMessageHandler implementation. | 31 // WebUIMessageHandler implementation. |
| 32 virtual void RegisterMessages() OVERRIDE; | 32 virtual void RegisterMessages() OVERRIDE; |
| 33 | 33 |
| 34 // Returns |results| through the given |callback| string. | 34 // Returns |results| through the given |callback| string. |
| 35 void ReturnResults(const std::string& callback, | 35 void ReturnResults(const std::string& callback, |
| 36 const base::ListValue* results); | 36 const base::ListValue* results); |
| 37 | 37 |
| 38 // Callback for the "getActiveIntervals" message. | 38 // Callback for the "getActiveIntervals" message. |
| 39 // |args| contains a start and an end time. |
| 39 void HandleGetActiveIntervals(const base::ListValue* args); | 40 void HandleGetActiveIntervals(const base::ListValue* args); |
| 40 | 41 |
| 41 // Callback for the "getAllEventTypes" message. | 42 // Callback for the "getAllEventTypes" message. |
| 43 // |args| is unused. |
| 42 void HandleGetAllEventTypes(const base::ListValue* args); | 44 void HandleGetAllEventTypes(const base::ListValue* args); |
| 43 | 45 |
| 44 // Callback for the "getEvents" message. | 46 // Callback for the "getEvents" message. |
| 47 // |args| contains an EventType id to collect and a start and end time. |
| 45 void HandleGetEvents(const base::ListValue* args); | 48 void HandleGetEvents(const base::ListValue* args); |
| 46 | 49 |
| 50 // Callback for the "getAllMetricTypes" message. |
| 51 // |args| is unused. |
| 52 void HandleGetAllMetricTypes(const base::ListValue* args); |
| 53 |
| 54 // Callback for the "getMetric" message. |
| 55 // |args| contains a MetricType id to collect, a start and end time, and a |
| 56 // time resolution which defines the spacing of metric samples returned. |
| 57 void HandleGetMetric(const base::ListValue* args); |
| 58 |
| 47 DISALLOW_COPY_AND_ASSIGN(WebUIHandler); | 59 DISALLOW_COPY_AND_ASSIGN(WebUIHandler); |
| 48 }; | 60 }; |
| 49 | 61 |
| 50 } // namespace performance_monitor | 62 } // namespace performance_monitor |
| 51 | 63 |
| 52 #endif // CHROME_BROWSER_UI_WEBUI_PERFORMANCE_MONITOR_WEB_UI_HANDLER_H_ | 64 #endif // CHROME_BROWSER_UI_WEBUI_PERFORMANCE_MONITOR_WEB_UI_HANDLER_H_ |
| OLD | NEW |