OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_GOOGLE_GOOGLE_URL_TRACKER_NAVIGATION_HELPER_IMPL_H_ | 5 #ifndef CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_NAVIGATION_HELPER_IMPL_H_ |
6 #define CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_NAVIGATION_HELPER_IMPL_H_ | 6 #define CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_NAVIGATION_HELPER_IMPL_H_ |
7 | 7 |
8 #include "chrome/browser/google/google_url_tracker_navigation_helper.h" | 8 #include "chrome/browser/google/google_url_tracker_navigation_helper.h" |
9 #include "content/public/browser/notification_observer.h" | 9 #include "content/public/browser/notification_observer.h" |
10 #include "content/public/browser/notification_registrar.h" | 10 #include "content/public/browser/notification_registrar.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 const content::NavigationController* nav_controller) OVERRIDE; | 33 const content::NavigationController* nav_controller) OVERRIDE; |
34 | 34 |
35 private: | 35 private: |
36 friend class GoogleURLTrackerNavigationHelperTest; | 36 friend class GoogleURLTrackerNavigationHelperTest; |
37 | 37 |
38 // content::NotificationObserver: | 38 // content::NotificationObserver: |
39 virtual void Observe(int type, | 39 virtual void Observe(int type, |
40 const content::NotificationSource& source, | 40 const content::NotificationSource& source, |
41 const content::NotificationDetails& details) OVERRIDE; | 41 const content::NotificationDetails& details) OVERRIDE; |
42 | 42 |
43 // Handles instant commit notifications by simulating the relevant navigation | |
44 // callbacks. | |
45 void OnInstantCommitted(content::NavigationController* nav_controller, | |
46 InfoBarService* infobar_service, | |
47 const GURL& search_url); | |
48 | |
49 // Returns a WebContents NavigationSource for the WebContents corresponding to | 43 // Returns a WebContents NavigationSource for the WebContents corresponding to |
50 // the given NavigationController NotificationSource. | 44 // the given NavigationController NotificationSource. |
51 virtual content::NotificationSource GetWebContentsSource( | 45 virtual content::NotificationSource GetWebContentsSource( |
52 const content::NotificationSource& nav_controller_source); | 46 const content::NotificationSource& nav_controller_source); |
53 | 47 |
54 GoogleURLTracker* tracker_; | 48 GoogleURLTracker* tracker_; |
55 content::NotificationRegistrar registrar_; | 49 content::NotificationRegistrar registrar_; |
56 }; | 50 }; |
57 | 51 |
58 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_NAVIGATION_HELPER_IMPL_H_ | 52 #endif // CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_NAVIGATION_HELPER_IMPL_H_ |
OLD | NEW |