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 <string> | 9 #include <string> |
9 | 10 |
10 #include "base/macros.h" | 11 #include "base/macros.h" |
11 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_ptr.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/web_contents_observer.h" | 17 #include "content/public/browser/web_contents_observer.h" |
18 #include "net/url_request/url_fetcher_delegate.h" | 18 #include "net/url_request/url_fetcher_delegate.h" |
19 | 19 |
20 class Profile; | 20 class Profile; |
21 class ShortcutsBackend; | 21 class ShortcutsBackend; |
22 | 22 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 void OnURLFetchComplete(const net::URLFetcher* source) override; | 95 void OnURLFetchComplete(const net::URLFetcher* source) override; |
96 | 96 |
97 // Once the load has committed and any URL fetch has completed, this displays | 97 // Once the load has committed and any URL fetch has completed, this displays |
98 // the alternate nav infobar if necessary, and deletes |this|. | 98 // the alternate nav infobar if necessary, and deletes |this|. |
99 void OnAllLoadingFinished(); | 99 void OnAllLoadingFinished(); |
100 | 100 |
101 const base::string16 text_; | 101 const base::string16 text_; |
102 const AutocompleteMatch match_; | 102 const AutocompleteMatch match_; |
103 const AutocompleteMatch alternate_nav_match_; | 103 const AutocompleteMatch alternate_nav_match_; |
104 scoped_refptr<ShortcutsBackend> shortcuts_backend_; // NULL in incognito. | 104 scoped_refptr<ShortcutsBackend> shortcuts_backend_; // NULL in incognito. |
105 scoped_ptr<net::URLFetcher> fetcher_; | 105 std::unique_ptr<net::URLFetcher> fetcher_; |
106 LoadState load_state_; | 106 LoadState load_state_; |
107 FetchState fetch_state_; | 107 FetchState fetch_state_; |
108 | 108 |
109 content::NotificationRegistrar registrar_; | 109 content::NotificationRegistrar registrar_; |
110 | 110 |
111 DISALLOW_COPY_AND_ASSIGN(ChromeOmniboxNavigationObserver); | 111 DISALLOW_COPY_AND_ASSIGN(ChromeOmniboxNavigationObserver); |
112 }; | 112 }; |
113 | 113 |
114 #endif // CHROME_BROWSER_UI_OMNIBOX_CHROME_OMNIBOX_NAVIGATION_OBSERVER_H_ | 114 #endif // CHROME_BROWSER_UI_OMNIBOX_CHROME_OMNIBOX_NAVIGATION_OBSERVER_H_ |
OLD | NEW |