OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "chrome/browser/page_load_metrics/page_load_tracker.h" | 5 #include "chrome/browser/page_load_metrics/page_load_tracker.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <ostream> | 8 #include <ostream> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 } | 632 } |
633 } | 633 } |
634 | 634 |
635 void PageLoadTracker::OnSubframeMetadataChanged() { | 635 void PageLoadTracker::OnSubframeMetadataChanged() { |
636 PageLoadExtraInfo extra_info(ComputePageLoadExtraInfo()); | 636 PageLoadExtraInfo extra_info(ComputePageLoadExtraInfo()); |
637 for (const auto& observer : observers_) { | 637 for (const auto& observer : observers_) { |
638 observer->OnLoadingBehaviorObserved(extra_info); | 638 observer->OnLoadingBehaviorObserved(extra_info); |
639 } | 639 } |
640 } | 640 } |
641 | 641 |
| 642 void PageLoadTracker::BroadcastEventToObservers(const void* const event_key) { |
| 643 for (const auto& observer : observers_) { |
| 644 observer->OnEventOccurred(event_key); |
| 645 } |
| 646 } |
| 647 |
642 } // namespace page_load_metrics | 648 } // namespace page_load_metrics |
OLD | NEW |