| 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_CHROME_OMNIBOX_NAVIGATION_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_UI_OMNIBOX_CHROME_OMNIBOX_NAVIGATION_OBSERVER_H_ |
| 6 #define CHROME_BROWSER_UI_OMNIBOX_CHROME_OMNIBOX_NAVIGATION_OBSERVER_H_ | 6 #define CHROME_BROWSER_UI_OMNIBOX_CHROME_OMNIBOX_NAVIGATION_OBSERVER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 72 |
| 73 // OmniboxNavigationObserver: | 73 // OmniboxNavigationObserver: |
| 74 bool HasSeenPendingLoad() const override; | 74 bool HasSeenPendingLoad() const override; |
| 75 | 75 |
| 76 // content::NotificationObserver: | 76 // content::NotificationObserver: |
| 77 void Observe(int type, | 77 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 void DidStartNavigationToPendingEntry( | 82 void DidStartNavigation( |
| 83 const GURL& url, | 83 content::NavigationHandle* navigation_handle) override; |
| 84 content::ReloadType reload_type) override; | 84 void DidFinishNavigation( |
| 85 void DidFailProvisionalLoad(content::RenderFrameHost* render_frame_host, | 85 content::NavigationHandle* navigation_handle) override; |
| 86 const GURL& validated_url, | |
| 87 int error_code, | |
| 88 const base::string16& error_description, | |
| 89 bool was_ignored_by_handler) override; | |
| 90 void NavigationEntryCommitted( | 86 void NavigationEntryCommitted( |
| 91 const content::LoadCommittedDetails& load_details) override; | 87 const content::LoadCommittedDetails& load_details) override; |
| 92 void WebContentsDestroyed() override; | 88 void WebContentsDestroyed() override; |
| 93 | 89 |
| 94 // net::URLFetcherDelegate: | 90 // net::URLFetcherDelegate: |
| 95 void OnURLFetchComplete(const net::URLFetcher* source) override; | 91 void OnURLFetchComplete(const net::URLFetcher* source) override; |
| 96 | 92 |
| 97 // 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 |
| 98 // the alternate nav infobar if necessary, and deletes |this|. | 94 // the alternate nav infobar if necessary, and deletes |this|. |
| 99 void OnAllLoadingFinished(); | 95 void OnAllLoadingFinished(); |
| 100 | 96 |
| 101 const base::string16 text_; | 97 const base::string16 text_; |
| 102 const AutocompleteMatch match_; | 98 const AutocompleteMatch match_; |
| 103 const AutocompleteMatch alternate_nav_match_; | 99 const AutocompleteMatch alternate_nav_match_; |
| 104 scoped_refptr<ShortcutsBackend> shortcuts_backend_; // NULL in incognito. | 100 scoped_refptr<ShortcutsBackend> shortcuts_backend_; // NULL in incognito. |
| 105 std::unique_ptr<net::URLFetcher> fetcher_; | 101 std::unique_ptr<net::URLFetcher> fetcher_; |
| 106 LoadState load_state_; | 102 LoadState load_state_; |
| 107 FetchState fetch_state_; | 103 FetchState fetch_state_; |
| 108 | 104 |
| 109 content::NotificationRegistrar registrar_; | 105 content::NotificationRegistrar registrar_; |
| 110 | 106 |
| 111 DISALLOW_COPY_AND_ASSIGN(ChromeOmniboxNavigationObserver); | 107 DISALLOW_COPY_AND_ASSIGN(ChromeOmniboxNavigationObserver); |
| 112 }; | 108 }; |
| 113 | 109 |
| 114 #endif // CHROME_BROWSER_UI_OMNIBOX_CHROME_OMNIBOX_NAVIGATION_OBSERVER_H_ | 110 #endif // CHROME_BROWSER_UI_OMNIBOX_CHROME_OMNIBOX_NAVIGATION_OBSERVER_H_ |
| OLD | NEW |