OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_PAGE_LOAD_METRICS_BROWSER_PAGE_TRACK_DECIDER_H_ |
| 6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_BROWSER_PAGE_TRACK_DECIDER_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "chrome/common/page_load_metrics/page_track_decider.h" |
| 10 |
| 11 namespace content { |
| 12 class NavigationHandle; |
| 13 class WebContents; |
| 14 } // namespace content |
| 15 |
| 16 namespace page_load_metrics { |
| 17 |
| 18 class PageLoadMetricsEmbedderInterface; |
| 19 |
| 20 class BrowserPageTrackDecider : public PageTrackDecider { |
| 21 public: |
| 22 // embedder_interface, web_contents, and navigation_handle are not owned by |
| 23 // BrowserPageTrackDecider, and must outlive the |
| 24 // BrowserPageTrackDecider. |
| 25 BrowserPageTrackDecider(PageLoadMetricsEmbedderInterface* embedder_interface, |
| 26 content::WebContents* web_contents, |
| 27 content::NavigationHandle* navigation_handle); |
| 28 ~BrowserPageTrackDecider() override; |
| 29 |
| 30 bool HasCommitted() override; |
| 31 bool IsHttpOrHttpsUrl() override; |
| 32 bool IsNewTabPageUrl() override; |
| 33 bool IsChromeErrorPage() override; |
| 34 bool IsHtmlOrXhtmlPage() override; |
| 35 int GetHttpStatusCode() override; |
| 36 |
| 37 private: |
| 38 PageLoadMetricsEmbedderInterface* const embedder_interface_; |
| 39 content::WebContents* const web_contents_; |
| 40 content::NavigationHandle* const navigation_handle_; |
| 41 |
| 42 DISALLOW_COPY_AND_ASSIGN(BrowserPageTrackDecider); |
| 43 }; |
| 44 |
| 45 } // namespace page_load_metrics |
| 46 |
| 47 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_BROWSER_PAGE_TRACK_DECIDER_H_ |
OLD | NEW |