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/data_use_measurement/data_use_web_contents_observer.h" | 5 #include "chrome/browser/data_use_measurement/data_use_web_contents_observer.h" |
6 | 6 |
7 #include "chrome/browser/data_use_measurement/chrome_data_use_ascriber_service.h
" | 7 #include "chrome/browser/data_use_measurement/chrome_data_use_ascriber_service.h
" |
8 #include "chrome/browser/data_use_measurement/chrome_data_use_ascriber_service_f
actory.h" | 8 #include "chrome/browser/data_use_measurement/chrome_data_use_ascriber_service_f
actory.h" |
9 #include "content/public/browser/navigation_handle.h" | 9 #include "content/public/browser/navigation_handle.h" |
10 #include "content/public/browser/render_frame_host.h" | 10 #include "content/public/browser/render_frame_host.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 void DataUseWebContentsObserver::DidStartNavigation( | 65 void DataUseWebContentsObserver::DidStartNavigation( |
66 content::NavigationHandle* navigation_handle) { | 66 content::NavigationHandle* navigation_handle) { |
67 service_->DidStartNavigation(navigation_handle); | 67 service_->DidStartNavigation(navigation_handle); |
68 } | 68 } |
69 | 69 |
70 void DataUseWebContentsObserver::ReadyToCommitNavigation( | 70 void DataUseWebContentsObserver::ReadyToCommitNavigation( |
71 content::NavigationHandle* navigation_handle) { | 71 content::NavigationHandle* navigation_handle) { |
72 service_->ReadyToCommitNavigation(navigation_handle); | 72 service_->ReadyToCommitNavigation(navigation_handle); |
73 } | 73 } |
74 | 74 |
| 75 void DataUseWebContentsObserver::WasShown() { |
| 76 service_->WasShownOrHidden(web_contents()->GetMainFrame(), true); |
| 77 } |
| 78 |
| 79 void DataUseWebContentsObserver::WasHidden() { |
| 80 service_->WasShownOrHidden(web_contents()->GetMainFrame(), false); |
| 81 } |
| 82 |
| 83 void DataUseWebContentsObserver::RenderFrameHostChanged( |
| 84 content::RenderFrameHost* old_host, |
| 85 content::RenderFrameHost* new_host) { |
| 86 service_->RenderFrameHostChanged(old_host, new_host); |
| 87 } |
| 88 |
75 } // namespace data_use_measurement | 89 } // namespace data_use_measurement |
OLD | NEW |