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

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

Issue 2903693004: Make PageLoadMetricsWaiter more resilient (Closed)
Patch Set: fix compile Created 3 years, 7 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_PAGE_LOAD_METRICS_UPDATE_DISPATCHER_H_ 5 #ifndef CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_UPDATE_DISPATCHER_H_
6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_UPDATE_DISPATCHER_H_ 6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_UPDATE_DISPATCHER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // stabilized. 74 // stabilized.
75 class PageLoadMetricsUpdateDispatcher { 75 class PageLoadMetricsUpdateDispatcher {
76 public: 76 public:
77 // The Client class is updated when metrics managed by the dispatcher have 77 // The Client class is updated when metrics managed by the dispatcher have
78 // changed. Typically it owns the dispatcher. 78 // changed. Typically it owns the dispatcher.
79 class Client { 79 class Client {
80 public: 80 public:
81 virtual ~Client() {} 81 virtual ~Client() {}
82 82
83 virtual void OnTimingChanged() = 0; 83 virtual void OnTimingChanged() = 0;
84 virtual void OnSubFrameTimingChanged(
85 const mojom::PageLoadTiming& timing) = 0;
84 virtual void OnMainFrameMetadataChanged() = 0; 86 virtual void OnMainFrameMetadataChanged() = 0;
85 virtual void OnSubframeMetadataChanged() = 0; 87 virtual void OnSubframeMetadataChanged() = 0;
86 }; 88 };
87 89
88 // The |client| instance must outlive this object. 90 // The |client| instance must outlive this object.
89 PageLoadMetricsUpdateDispatcher( 91 PageLoadMetricsUpdateDispatcher(
90 Client* client, 92 Client* client,
91 content::NavigationHandle* navigation_handle, 93 content::NavigationHandle* navigation_handle,
92 PageLoadMetricsEmbedderInterface* embedder_interface); 94 PageLoadMetricsEmbedderInterface* embedder_interface);
93 ~PageLoadMetricsUpdateDispatcher(); 95 ~PageLoadMetricsUpdateDispatcher();
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 // Navigation start offsets for the most recently committed document in each 156 // Navigation start offsets for the most recently committed document in each
155 // frame. 157 // frame.
156 std::map<FrameTreeNodeId, base::TimeDelta> subframe_navigation_start_offset_; 158 std::map<FrameTreeNodeId, base::TimeDelta> subframe_navigation_start_offset_;
157 159
158 DISALLOW_COPY_AND_ASSIGN(PageLoadMetricsUpdateDispatcher); 160 DISALLOW_COPY_AND_ASSIGN(PageLoadMetricsUpdateDispatcher);
159 }; 161 };
160 162
161 } // namespace page_load_metrics 163 } // namespace page_load_metrics
162 164
163 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_UPDATE_DISPATCHER_ H_ 165 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_METRICS_UPDATE_DISPATCHER_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698