| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_NET_PREDICTOR_TAB_HELPER_H_ | 5 #ifndef CHROME_BROWSER_NET_PREDICTOR_TAB_HELPER_H_ |
| 6 #define CHROME_BROWSER_NET_PREDICTOR_TAB_HELPER_H_ | 6 #define CHROME_BROWSER_NET_PREDICTOR_TAB_HELPER_H_ |
| 7 | 7 |
| 8 #include "content/public/browser/notification_observer.h" | 8 #include "content/public/browser/notification_observer.h" |
| 9 #include "content/public/browser/notification_registrar.h" | 9 #include "content/public/browser/notification_registrar.h" |
| 10 #include "content/public/browser/web_contents_observer.h" | 10 #include "content/public/browser/web_contents_observer.h" |
| 11 #include "content/public/browser/web_contents_user_data.h" | 11 #include "content/public/browser/web_contents_user_data.h" |
| 12 | 12 |
| 13 namespace chrome_browser_net { | 13 namespace chrome_browser_net { |
| 14 | 14 |
| 15 class PredictorTabHelper | 15 class PredictorTabHelper |
| 16 : public content::WebContentsObserver, | 16 : public content::WebContentsObserver, |
| 17 public content::WebContentsUserData<PredictorTabHelper> { | 17 public content::WebContentsUserData<PredictorTabHelper> { |
| 18 public: | 18 public: |
| 19 virtual ~PredictorTabHelper(); | 19 virtual ~PredictorTabHelper(); |
| 20 | 20 |
| 21 // content::WebContentsObserver implementation | 21 // content::WebContentsObserver implementation |
| 22 virtual void NavigateToPendingEntry( | 22 virtual void DidCreatePendingEntry( |
| 23 const GURL& url, | 23 const GURL& url, |
| 24 content::NavigationController::ReloadType reload_type) OVERRIDE; | 24 content::NavigationController::ReloadType reload_type) OVERRIDE; |
| 25 virtual void DidNavigateMainFrame( | 25 virtual void DidNavigateMainFrame( |
| 26 const content::LoadCommittedDetails& details, | 26 const content::LoadCommittedDetails& details, |
| 27 const content::FrameNavigateParams& params) OVERRIDE; | 27 const content::FrameNavigateParams& params) OVERRIDE; |
| 28 | 28 |
| 29 private: | 29 private: |
| 30 explicit PredictorTabHelper(content::WebContents* web_contents); | 30 explicit PredictorTabHelper(content::WebContents* web_contents); |
| 31 friend class content::WebContentsUserData<PredictorTabHelper>; | 31 friend class content::WebContentsUserData<PredictorTabHelper>; |
| 32 | 32 |
| 33 DISALLOW_COPY_AND_ASSIGN(PredictorTabHelper); | 33 DISALLOW_COPY_AND_ASSIGN(PredictorTabHelper); |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 } // namespace chrome_browser_net | 36 } // namespace chrome_browser_net |
| 37 | 37 |
| 38 #endif // CHROME_BROWSER_NET_PREDICTOR_TAB_HELPER_H_ | 38 #endif // CHROME_BROWSER_NET_PREDICTOR_TAB_HELPER_H_ |
| OLD | NEW |