| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 const content::NotificationSource& source, | 77 const content::NotificationSource& source, |
| 78 const content::NotificationDetails& details) override; | 78 const content::NotificationDetails& details) override; |
| 79 | 79 |
| 80 // content::WebContentsObserver: | 80 // content::WebContentsObserver: |
| 81 void DidStartNavigationToPendingEntry( | 81 void DidStartNavigationToPendingEntry( |
| 82 const GURL& url, | 82 const GURL& url, |
| 83 content::NavigationController::ReloadType reload_type) override; | 83 content::NavigationController::ReloadType reload_type) override; |
| 84 void DidFailProvisionalLoad(content::RenderFrameHost* render_frame_host, | 84 void DidFailProvisionalLoad(content::RenderFrameHost* render_frame_host, |
| 85 const GURL& validated_url, | 85 const GURL& validated_url, |
| 86 int error_code, | 86 int error_code, |
| 87 const base::string16& error_description) override; | 87 const base::string16& error_description, |
| 88 bool was_ignored_by_handler) override; |
| 88 void NavigationEntryCommitted( | 89 void NavigationEntryCommitted( |
| 89 const content::LoadCommittedDetails& load_details) override; | 90 const content::LoadCommittedDetails& load_details) override; |
| 90 void WebContentsDestroyed() override; | 91 void WebContentsDestroyed() override; |
| 91 | 92 |
| 92 // net::URLFetcherDelegate: | 93 // net::URLFetcherDelegate: |
| 93 void OnURLFetchComplete(const net::URLFetcher* source) override; | 94 void OnURLFetchComplete(const net::URLFetcher* source) override; |
| 94 | 95 |
| 95 // Once the load has committed and any URL fetch has completed, this displays | 96 // Once the load has committed and any URL fetch has completed, this displays |
| 96 // the alternate nav infobar if necessary, and deletes |this|. | 97 // the alternate nav infobar if necessary, and deletes |this|. |
| 97 void OnAllLoadingFinished(); | 98 void OnAllLoadingFinished(); |
| 98 | 99 |
| 99 const base::string16 text_; | 100 const base::string16 text_; |
| 100 const AutocompleteMatch match_; | 101 const AutocompleteMatch match_; |
| 101 const AutocompleteMatch alternate_nav_match_; | 102 const AutocompleteMatch alternate_nav_match_; |
| 102 scoped_refptr<ShortcutsBackend> shortcuts_backend_; // NULL in incognito. | 103 scoped_refptr<ShortcutsBackend> shortcuts_backend_; // NULL in incognito. |
| 103 scoped_ptr<net::URLFetcher> fetcher_; | 104 scoped_ptr<net::URLFetcher> fetcher_; |
| 104 LoadState load_state_; | 105 LoadState load_state_; |
| 105 FetchState fetch_state_; | 106 FetchState fetch_state_; |
| 106 | 107 |
| 107 content::NotificationRegistrar registrar_; | 108 content::NotificationRegistrar registrar_; |
| 108 | 109 |
| 109 DISALLOW_COPY_AND_ASSIGN(OmniboxNavigationObserver); | 110 DISALLOW_COPY_AND_ASSIGN(OmniboxNavigationObserver); |
| 110 }; | 111 }; |
| 111 | 112 |
| 112 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_NAVIGATION_OBSERVER_H_ | 113 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_NAVIGATION_OBSERVER_H_ |
| OLD | NEW |