| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 69 |
| 70 private: | 70 private: |
| 71 page_load_metrics::MetricsWebContentsObserver* observer_; | 71 page_load_metrics::MetricsWebContentsObserver* observer_; |
| 72 | 72 |
| 73 DISALLOW_COPY_AND_ASSIGN(TestingObserver); | 73 DISALLOW_COPY_AND_ASSIGN(TestingObserver); |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 // Note that the returned metrics is owned by the web contents. | 76 // Note that the returned metrics is owned by the web contents. |
| 77 static MetricsWebContentsObserver* CreateForWebContents( | 77 static MetricsWebContentsObserver* CreateForWebContents( |
| 78 content::WebContents* web_contents, | 78 content::WebContents* web_contents, |
| 79 const base::Optional<content::WebContents::CreateParams>& create_params, | |
| 80 std::unique_ptr<PageLoadMetricsEmbedderInterface> embedder_interface); | 79 std::unique_ptr<PageLoadMetricsEmbedderInterface> embedder_interface); |
| 81 MetricsWebContentsObserver( | 80 MetricsWebContentsObserver( |
| 82 content::WebContents* web_contents, | 81 content::WebContents* web_contents, |
| 83 const base::Optional<content::WebContents::CreateParams>& create_params, | |
| 84 std::unique_ptr<PageLoadMetricsEmbedderInterface> embedder_interface); | 82 std::unique_ptr<PageLoadMetricsEmbedderInterface> embedder_interface); |
| 85 ~MetricsWebContentsObserver() override; | 83 ~MetricsWebContentsObserver() override; |
| 86 | 84 |
| 87 // content::WebContentsObserver implementation: | 85 // content::WebContentsObserver implementation: |
| 88 bool OnMessageReceived(const IPC::Message& message, | 86 bool OnMessageReceived(const IPC::Message& message, |
| 89 content::RenderFrameHost* render_frame_host) override; | 87 content::RenderFrameHost* render_frame_host) override; |
| 90 void DidFinishNavigation( | 88 void DidFinishNavigation( |
| 91 content::NavigationHandle* navigation_handle) override; | 89 content::NavigationHandle* navigation_handle) override; |
| 92 void DidRedirectNavigation( | 90 void DidRedirectNavigation( |
| 93 content::NavigationHandle* navigation_handle) override; | 91 content::NavigationHandle* navigation_handle) override; |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 base::ObserverList<TestingObserver> testing_observers_; | 231 base::ObserverList<TestingObserver> testing_observers_; |
| 234 content::WebContentsFrameBindingSet<mojom::PageLoadMetrics> | 232 content::WebContentsFrameBindingSet<mojom::PageLoadMetrics> |
| 235 page_load_metrics_binding_; | 233 page_load_metrics_binding_; |
| 236 | 234 |
| 237 DISALLOW_COPY_AND_ASSIGN(MetricsWebContentsObserver); | 235 DISALLOW_COPY_AND_ASSIGN(MetricsWebContentsObserver); |
| 238 }; | 236 }; |
| 239 | 237 |
| 240 } // namespace page_load_metrics | 238 } // namespace page_load_metrics |
| 241 | 239 |
| 242 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_ | 240 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_METRICS_WEB_CONTENTS_OBSERVER_H_ |
| OLD | NEW |