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

Side by Side Diff: content/renderer/stats_collection_controller.h

Issue 2923053002: Move MainWorldScriptContext accessor/method from WebFrame to WebLocalFrame. (Closed)
Patch Set: Rebasing... Created 3 years, 6 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
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_RENDERER_STATS_COLLECTION_CONTROLLER_H_ 5 #ifndef CONTENT_RENDERER_STATS_COLLECTION_CONTROLLER_H_
6 #define CONTENT_RENDERER_STATS_COLLECTION_CONTROLLER_H_ 6 #define CONTENT_RENDERER_STATS_COLLECTION_CONTROLLER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "gin/wrappable.h" 9 #include "gin/wrappable.h"
10 10
11 namespace blink { 11 namespace blink {
12 class WebFrame; 12 class WebLocalFrame;
13 } 13 }
14 14
15 namespace content { 15 namespace content {
16 16
17 // This class is exposed in JS as window.statsCollectionController and provides 17 // This class is exposed in JS as window.statsCollectionController and provides
18 // functionality to read out statistics from the browser. 18 // functionality to read out statistics from the browser.
19 // Its use must be enabled specifically via the 19 // Its use must be enabled specifically via the
20 // --enable-stats-collection-bindings command line flag. 20 // --enable-stats-collection-bindings command line flag.
21 class StatsCollectionController 21 class StatsCollectionController
22 : public gin::Wrappable<StatsCollectionController> { 22 : public gin::Wrappable<StatsCollectionController> {
23 public: 23 public:
24 static gin::WrapperInfo kWrapperInfo; 24 static gin::WrapperInfo kWrapperInfo;
25 25
26 static void Install(blink::WebFrame* frame); 26 static void Install(blink::WebLocalFrame* frame);
27 27
28 private: 28 private:
29 StatsCollectionController(); 29 StatsCollectionController();
30 ~StatsCollectionController() override; 30 ~StatsCollectionController() override;
31 31
32 // gin::WrappableBase 32 // gin::WrappableBase
33 gin::ObjectTemplateBuilder GetObjectTemplateBuilder( 33 gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
34 v8::Isolate* isolate) override; 34 v8::Isolate* isolate) override;
35 35
36 // Retrieves a histogram and returns a JSON representation of it. 36 // Retrieves a histogram and returns a JSON representation of it.
37 std::string GetHistogram(const std::string& histogram_name); 37 std::string GetHistogram(const std::string& histogram_name);
38 38
39 // Retrieves a histogram from the browser process and returns a JSON 39 // Retrieves a histogram from the browser process and returns a JSON
40 // representation of it. 40 // representation of it.
41 std::string GetBrowserHistogram(const std::string& histogram_name); 41 std::string GetBrowserHistogram(const std::string& histogram_name);
42 42
43 // Returns JSON representation of tab timing information for the current tab. 43 // Returns JSON representation of tab timing information for the current tab.
44 std::string GetTabLoadTiming(); 44 std::string GetTabLoadTiming();
45 45
46 DISALLOW_COPY_AND_ASSIGN(StatsCollectionController); 46 DISALLOW_COPY_AND_ASSIGN(StatsCollectionController);
47 }; 47 };
48 48
49 } // namespace content 49 } // namespace content
50 50
51 #endif // CONTENT_RENDERER_STATS_COLLECTION_CONTROLLER_H_ 51 #endif // CONTENT_RENDERER_STATS_COLLECTION_CONTROLLER_H_
OLDNEW
« no previous file with comments | « content/renderer/skia_benchmarking_extension.cc ('k') | content/renderer/stats_collection_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698