OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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_RENDERER_PAGE_LOAD_HISTOGRAMS_H_ | 5 #ifndef CHROME_RENDERER_PAGE_LOAD_HISTOGRAMS_H_ |
6 #define CHROME_RENDERER_PAGE_LOAD_HISTOGRAMS_H_ | 6 #define CHROME_RENDERER_PAGE_LOAD_HISTOGRAMS_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "content/renderer/render_view_observer.h" | 9 #include "content/renderer/render_view_observer.h" |
10 | 10 |
11 class NavigationState; | 11 class NavigationState; |
12 class RendererHistogramSnapshots; | 12 class RendererHistogramSnapshots; |
13 | 13 |
14 class PageLoadHistograms : public RenderViewObserver { | 14 class PageLoadHistograms : public RenderViewObserver { |
15 public: | 15 public: |
16 PageLoadHistograms(RenderView* render_view, | 16 PageLoadHistograms(RenderView* render_view, |
17 RendererHistogramSnapshots* histogram_snapshots); | 17 RendererHistogramSnapshots* histogram_snapshots); |
18 | 18 |
19 private: | 19 private: |
20 // RenderViewObserver implementation. | 20 // RenderViewObserver implementation. |
21 virtual void FrameWillClose(WebKit::WebFrame* frame); | 21 virtual void FrameWillClose(WebKit::WebFrame* frame); |
22 virtual void LogCrossFramePropertyAccess( | |
23 WebKit::WebFrame* frame, | |
24 WebKit::WebFrame* target, | |
25 bool cross_origin, | |
26 const WebKit::WebString& property_name, | |
27 unsigned long long event_id); | |
28 virtual bool OnMessageReceived(const IPC::Message& message); | 22 virtual bool OnMessageReceived(const IPC::Message& message); |
29 | 23 |
30 // Dump all page load histograms appropriate for the given frame. | 24 // Dump all page load histograms appropriate for the given frame. |
31 // | 25 // |
32 // This method will only dump once-per-instance, so it is safe to call | 26 // This method will only dump once-per-instance, so it is safe to call |
33 // multiple times. | 27 // multiple times. |
34 // | 28 // |
35 // The time points we keep are | 29 // The time points we keep are |
36 // request: time document was requested by user | 30 // request: time document was requested by user |
37 // start: time load of document started | 31 // start: time load of document started |
(...skipping 19 matching lines...) Expand all Loading... |
57 // These are per-page-load counts, reset to 0 after they are dumped. | 51 // These are per-page-load counts, reset to 0 after they are dumped. |
58 int cross_origin_access_count_; | 52 int cross_origin_access_count_; |
59 int same_origin_access_count_; | 53 int same_origin_access_count_; |
60 | 54 |
61 RendererHistogramSnapshots* histogram_snapshots_; | 55 RendererHistogramSnapshots* histogram_snapshots_; |
62 | 56 |
63 DISALLOW_COPY_AND_ASSIGN(PageLoadHistograms); | 57 DISALLOW_COPY_AND_ASSIGN(PageLoadHistograms); |
64 }; | 58 }; |
65 | 59 |
66 #endif // CHROME_RENDERER_PAGE_LOAD_HISTOGRAMS_H_ | 60 #endif // CHROME_RENDERER_PAGE_LOAD_HISTOGRAMS_H_ |
OLD | NEW |