OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_ |
6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_ | 6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <vector> | 10 #include <vector> |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 // Return a PageLoadTracker (either provisional or committed) that matches the | 104 // Return a PageLoadTracker (either provisional or committed) that matches the |
105 // given request attributes, or nullptr if there are no matching | 105 // given request attributes, or nullptr if there are no matching |
106 // PageLoadTrackers. | 106 // PageLoadTrackers. |
107 PageLoadTracker* GetTrackerOrNullForRequest( | 107 PageLoadTracker* GetTrackerOrNullForRequest( |
108 const content::GlobalRequestID& request_id, | 108 const content::GlobalRequestID& request_id, |
109 content::ResourceType resource_type, | 109 content::ResourceType resource_type, |
110 base::TimeTicks creation_time); | 110 base::TimeTicks creation_time); |
111 | 111 |
112 // Notify all loads, provisional and committed, that we performed an action | 112 // Notify all loads, provisional and committed, that we performed an action |
113 // that might abort them. | 113 // that might abort them. |
114 void NotifyAbortAllLoads(UserAbortType abort_type, | 114 void NotifyPageEndAllLoads(PageEndReason page_end_reason, |
115 UserInitiatedInfo user_initiated_info); | 115 UserInitiatedInfo user_initiated_info); |
116 void NotifyAbortAllLoadsWithTimestamp(UserAbortType abort_type, | 116 void NotifyPageEndAllLoadsWithTimestamp(PageEndReason page_end_reason, |
117 UserInitiatedInfo user_initiated_info, | 117 UserInitiatedInfo user_initiated_info, |
118 base::TimeTicks timestamp, | 118 base::TimeTicks timestamp, |
119 bool is_certainly_browser_timestamp); | 119 bool is_certainly_browser_timestamp); |
120 | 120 |
121 // Register / Unregister input event callback to given RenderViewHost | 121 // Register / Unregister input event callback to given RenderViewHost |
122 void RegisterInputEventObserver(content::RenderViewHost* host); | 122 void RegisterInputEventObserver(content::RenderViewHost* host); |
123 void UnregisterInputEventObserver(content::RenderViewHost* host); | 123 void UnregisterInputEventObserver(content::RenderViewHost* host); |
124 | 124 |
125 // Notify aborted provisional loads that a new navigation occurred. This is | 125 // Notify aborted provisional loads that a new navigation occurred. This is |
126 // used for more consistent attribution tracking for aborted provisional | 126 // used for more consistent attribution tracking for aborted provisional |
127 // loads. This method returns the provisional load that was likely aborted | 127 // loads. This method returns the provisional load that was likely aborted |
128 // by this navigation, to help instantiate the new PageLoadTracker. | 128 // by this navigation, to help instantiate the new PageLoadTracker. |
129 std::unique_ptr<PageLoadTracker> NotifyAbortedProvisionalLoadsNewNavigation( | 129 std::unique_ptr<PageLoadTracker> NotifyAbortedProvisionalLoadsNewNavigation( |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 | 162 |
163 // Has the MWCO observed at least one navigation? | 163 // Has the MWCO observed at least one navigation? |
164 bool has_navigated_; | 164 bool has_navigated_; |
165 | 165 |
166 DISALLOW_COPY_AND_ASSIGN(MetricsWebContentsObserver); | 166 DISALLOW_COPY_AND_ASSIGN(MetricsWebContentsObserver); |
167 }; | 167 }; |
168 | 168 |
169 } // namespace page_load_metrics | 169 } // namespace page_load_metrics |
170 | 170 |
171 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_ | 171 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_ |
OLD | NEW |