Update function names in BrowserContextKeyedServiceFactory::GetServiceForBrowserConte...
[chromium-blink-merge.git] / content / renderer / stats_collection_controller.h
blob63175d830a9ca883f0a751fc81822dd436c350c2
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_RENDERER_STATS_COLLECTION_CONTROLLER_H_
6 #define CONTENT_RENDERER_STATS_COLLECTION_CONTROLLER_H_
8 #include "ipc/ipc_sender.h"
9 #include "webkit/renderer/cpp_bound_class.h"
11 namespace content {
13 // This class is exposed in JS as window.statsCollectionController and provides
14 // functionality to read out statistics from the browser.
15 // Its use must be enabled specifically via the
16 // --enable-stats-collection-bindings command line flag.
17 class StatsCollectionController : public webkit_glue::CppBoundClass {
18 public:
19 StatsCollectionController();
21 void set_message_sender(IPC::Sender* sender) {
22 sender_ = sender;
25 // Retrieves a histogram and returns a JSON representation of it.
26 void GetHistogram(const webkit_glue::CppArgumentList& args,
27 webkit_glue::CppVariant* result);
29 // Retrieves a histogram from the browser process and returns a JSON
30 // representation of it.
31 void GetBrowserHistogram(const webkit_glue::CppArgumentList& args,
32 webkit_glue::CppVariant* result);
34 // Returns JSON representation of tab timing information for the current tab.
35 void GetTabLoadTiming(const webkit_glue::CppArgumentList& args,
36 webkit_glue::CppVariant* result);
37 private:
38 IPC::Sender* sender_;
41 } // namespace content
43 #endif // CONTENT_RENDERER_STATS_COLLECTION_CONTROLLER_H_