OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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_UI_OMNIBOX_OMNIBOX_NAVIGATION_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_NAVIGATION_OBSERVER_H_ |
6 #define CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_NAVIGATION_OBSERVER_H_ | 6 #define CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_NAVIGATION_OBSERVER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 FETCH_SUCCEEDED, | 72 FETCH_SUCCEEDED, |
73 FETCH_FAILED, | 73 FETCH_FAILED, |
74 }; | 74 }; |
75 | 75 |
76 // content::NotificationObserver: | 76 // content::NotificationObserver: |
77 virtual void Observe(int type, | 77 virtual void Observe(int type, |
78 const content::NotificationSource& source, | 78 const content::NotificationSource& source, |
79 const content::NotificationDetails& details) OVERRIDE; | 79 const content::NotificationDetails& details) OVERRIDE; |
80 | 80 |
81 // content::WebContentsObserver: | 81 // content::WebContentsObserver: |
82 virtual void NavigateToPendingEntry( | 82 virtual void DidStartNavigationToPendingEntry( |
83 const GURL& url, | 83 const GURL& url, |
84 content::NavigationController::ReloadType reload_type) OVERRIDE; | 84 content::NavigationController::ReloadType reload_type) OVERRIDE; |
85 virtual void NavigationEntryCommitted( | 85 virtual void NavigationEntryCommitted( |
86 const content::LoadCommittedDetails& load_details) OVERRIDE; | 86 const content::LoadCommittedDetails& load_details) OVERRIDE; |
87 virtual void WebContentsDestroyed( | 87 virtual void WebContentsDestroyed( |
88 content::WebContents* web_contents) OVERRIDE; | 88 content::WebContents* web_contents) OVERRIDE; |
89 | 89 |
90 // net::URLFetcherDelegate: | 90 // net::URLFetcherDelegate: |
91 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; | 91 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; |
92 | 92 |
93 // Once the load has committed and any URL fetch has completed, this displays | 93 // Once the load has committed and any URL fetch has completed, this displays |
94 // the alternate nav infobar if necessary, and deletes |this|. | 94 // the alternate nav infobar if necessary, and deletes |this|. |
95 void OnAllLoadingFinished(); | 95 void OnAllLoadingFinished(); |
96 | 96 |
97 const string16 text_; | 97 const string16 text_; |
98 const AutocompleteMatch match_; | 98 const AutocompleteMatch match_; |
99 const AutocompleteMatch alternate_nav_match_; | 99 const AutocompleteMatch alternate_nav_match_; |
100 scoped_refptr<history::ShortcutsBackend> shortcuts_backend_; // May be NULL | 100 scoped_refptr<history::ShortcutsBackend> shortcuts_backend_; // May be NULL |
101 // in incognito. | 101 // in incognito. |
102 scoped_ptr<net::URLFetcher> fetcher_; | 102 scoped_ptr<net::URLFetcher> fetcher_; |
103 LoadState load_state_; | 103 LoadState load_state_; |
104 FetchState fetch_state_; | 104 FetchState fetch_state_; |
105 | 105 |
106 content::NotificationRegistrar registrar_; | 106 content::NotificationRegistrar registrar_; |
107 | 107 |
108 DISALLOW_COPY_AND_ASSIGN(OmniboxNavigationObserver); | 108 DISALLOW_COPY_AND_ASSIGN(OmniboxNavigationObserver); |
109 }; | 109 }; |
110 | 110 |
111 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_NAVIGATION_OBSERVER_H_ | 111 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_NAVIGATION_OBSERVER_H_ |
OLD | NEW |