| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TAB_HELPER_H_ | 5 #ifndef CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TAB_HELPER_H_ |
| 6 #define CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TAB_HELPER_H_ | 6 #define CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TAB_HELPER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" |
| 8 #include "content/public/browser/web_contents_observer.h" | 9 #include "content/public/browser/web_contents_observer.h" |
| 9 #include "content/public/browser/web_contents_user_data.h" | 10 #include "content/public/browser/web_contents_user_data.h" |
| 10 | 11 |
| 11 namespace predictors { | 12 namespace predictors { |
| 12 | 13 |
| 13 class ResourcePrefetchPredictorTabHelper | 14 class ResourcePrefetchPredictorTabHelper |
| 14 : public content::WebContentsObserver, | 15 : public content::WebContentsObserver, |
| 15 public content::WebContentsUserData<ResourcePrefetchPredictorTabHelper> { | 16 public content::WebContentsUserData<ResourcePrefetchPredictorTabHelper> { |
| 16 public: | 17 public: |
| 17 ~ResourcePrefetchPredictorTabHelper() override; | 18 ~ResourcePrefetchPredictorTabHelper() override; |
| 18 | 19 |
| 19 // content::WebContentsObserver implementation | 20 // content::WebContentsObserver implementation |
| 20 void DocumentOnLoadCompletedInMainFrame() override; | 21 void DocumentOnLoadCompletedInMainFrame() override; |
| 21 void DidLoadResourceFromMemoryCache( | 22 void DidLoadResourceFromMemoryCache( |
| 22 const content::LoadFromMemoryCacheDetails& details) override; | 23 const content::LoadFromMemoryCacheDetails& details) override; |
| 23 | 24 |
| 24 private: | 25 private: |
| 25 explicit ResourcePrefetchPredictorTabHelper( | 26 explicit ResourcePrefetchPredictorTabHelper( |
| 26 content::WebContents* web_contents); | 27 content::WebContents* web_contents); |
| 27 friend class content::WebContentsUserData<ResourcePrefetchPredictorTabHelper>; | 28 friend class content::WebContentsUserData<ResourcePrefetchPredictorTabHelper>; |
| 28 | 29 |
| 29 DISALLOW_COPY_AND_ASSIGN(ResourcePrefetchPredictorTabHelper); | 30 DISALLOW_COPY_AND_ASSIGN(ResourcePrefetchPredictorTabHelper); |
| 30 }; | 31 }; |
| 31 | 32 |
| 32 } // namespace predictors | 33 } // namespace predictors |
| 33 | 34 |
| 34 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TAB_HELPER_H_ | 35 #endif // CHROME_BROWSER_PREDICTORS_RESOURCE_PREFETCH_PREDICTOR_TAB_HELPER_H_ |
| OLD | NEW |