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