| 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 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "components/omnibox/browser/autocomplete_match.h" | 13 #include "components/omnibox/browser/autocomplete_match.h" |
| 14 #include "components/omnibox/browser/omnibox_navigation_observer.h" | 14 #include "components/omnibox/browser/omnibox_navigation_observer.h" |
| 15 #include "content/public/browser/notification_observer.h" | 15 #include "content/public/browser/notification_observer.h" |
| 16 #include "content/public/browser/notification_registrar.h" | 16 #include "content/public/browser/notification_registrar.h" |
| 17 #include "content/public/browser/reload_type.h" | 17 #include "content/public/browser/reload_type.h" |
| 18 #include "content/public/browser/web_contents_observer.h" | 18 #include "content/public/browser/web_contents_observer.h" |
| 19 #include "net/url_request/url_fetcher_delegate.h" | 19 #include "net/url_request/url_fetcher_delegate.h" |
| 20 | 20 |
| 21 class Profile; | 21 class Profile; |
| 22 class ShortcutsBackend; | 22 class ShortcutsBackend; |
| 23 | 23 |
| 24 namespace net { | 24 namespace net { |
| 25 class URLFetcher; | 25 class URLFetcher; |
| 26 class URLRequestStatus; | |
| 27 } | 26 } |
| 28 | 27 |
| 29 // Monitors omnibox navigations in order to trigger behaviors that depend on | 28 // Monitors omnibox navigations in order to trigger behaviors that depend on |
| 30 // successful navigations. | 29 // successful navigations. |
| 31 // | 30 // |
| 32 // Currently two such behaviors exist: | 31 // Currently two such behaviors exist: |
| 33 // (1) For single-word queries where we can't tell if the entry was a search or | 32 // (1) For single-word queries where we can't tell if the entry was a search or |
| 34 // an intranet hostname, the omnibox opens as a search by default, but this | 33 // an intranet hostname, the omnibox opens as a search by default, but this |
| 35 // class attempts to open as a URL via an HTTP HEAD request. If successful, | 34 // class attempts to open as a URL via an HTTP HEAD request. If successful, |
| 36 // displays an infobar once the search result has also loaded. See | 35 // displays an infobar once the search result has also loaded. See |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 std::unique_ptr<net::URLFetcher> fetcher_; | 105 std::unique_ptr<net::URLFetcher> fetcher_; |
| 107 LoadState load_state_; | 106 LoadState load_state_; |
| 108 FetchState fetch_state_; | 107 FetchState fetch_state_; |
| 109 | 108 |
| 110 content::NotificationRegistrar registrar_; | 109 content::NotificationRegistrar registrar_; |
| 111 | 110 |
| 112 DISALLOW_COPY_AND_ASSIGN(ChromeOmniboxNavigationObserver); | 111 DISALLOW_COPY_AND_ASSIGN(ChromeOmniboxNavigationObserver); |
| 113 }; | 112 }; |
| 114 | 113 |
| 115 #endif // CHROME_BROWSER_UI_OMNIBOX_CHROME_OMNIBOX_NAVIGATION_OBSERVER_H_ | 114 #endif // CHROME_BROWSER_UI_OMNIBOX_CHROME_OMNIBOX_NAVIGATION_OBSERVER_H_ |
| OLD | NEW |