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

Side by Side Diff: chrome/browser/page_load_metrics/metrics_web_contents_observer.h

Issue 2952343004: Adding previews information to PLM UKM (Closed)
Patch Set: comment on BroadcastEventToObservers Created 3 years, 5 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 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 131
132 // Register / unregister TestingObservers. Should only be called from tests. 132 // Register / unregister TestingObservers. Should only be called from tests.
133 void AddTestingObserver(TestingObserver* observer); 133 void AddTestingObserver(TestingObserver* observer);
134 void RemoveTestingObserver(TestingObserver* observer); 134 void RemoveTestingObserver(TestingObserver* observer);
135 135
136 // public only for testing 136 // public only for testing
137 void OnTimingUpdated(content::RenderFrameHost* render_frame_host, 137 void OnTimingUpdated(content::RenderFrameHost* render_frame_host,
138 const mojom::PageLoadTiming& timing, 138 const mojom::PageLoadTiming& timing,
139 const mojom::PageLoadMetadata& metadata); 139 const mojom::PageLoadMetadata& metadata);
140 140
141 // Informs the observers of the currently committed load that the event
142 // corresponding to |event_key| has occurred. This should not be called within
143 // WebContentsObserver::DidFinishNavigation methods.
144 // This method is subject to change and may be removed in the future.
145 void BroadcastEventToObservers(const void* const event_key);
146
141 private: 147 private:
142 friend class content::WebContentsUserData<MetricsWebContentsObserver>; 148 friend class content::WebContentsUserData<MetricsWebContentsObserver>;
143 149
144 // page_load_metrics::mojom::PageLoadMetrics implementation. 150 // page_load_metrics::mojom::PageLoadMetrics implementation.
145 void UpdateTiming(mojom::PageLoadTimingPtr timing, 151 void UpdateTiming(mojom::PageLoadTimingPtr timing,
146 mojom::PageLoadMetadataPtr metadata) override; 152 mojom::PageLoadMetadataPtr metadata) override;
147 153
148 void HandleFailedNavigationForTrackedLoad( 154 void HandleFailedNavigationForTrackedLoad(
149 content::NavigationHandle* navigation_handle, 155 content::NavigationHandle* navigation_handle,
150 std::unique_ptr<PageLoadTracker> tracker); 156 std::unique_ptr<PageLoadTracker> tracker);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 base::ObserverList<TestingObserver> testing_observers_; 221 base::ObserverList<TestingObserver> testing_observers_;
216 content::WebContentsFrameBindingSet<mojom::PageLoadMetrics> 222 content::WebContentsFrameBindingSet<mojom::PageLoadMetrics>
217 page_load_metrics_binding_; 223 page_load_metrics_binding_;
218 224
219 DISALLOW_COPY_AND_ASSIGN(MetricsWebContentsObserver); 225 DISALLOW_COPY_AND_ASSIGN(MetricsWebContentsObserver);
220 }; 226 };
221 227
222 } // namespace page_load_metrics 228 } // namespace page_load_metrics
223 229
224 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_ 230 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698