OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef IOS_CHROME_BROWSER_UI_OMNIBOX_CHROME_OMNIBOX_CLIENT_IOS_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_OMNIBOX_CHROME_OMNIBOX_CLIENT_IOS_H_ |
| 7 |
| 8 #include <memory> |
| 9 |
| 10 #include "base/compiler_specific.h" |
| 11 #include "components/omnibox/browser/omnibox_client.h" |
| 12 #include "ios/chrome/browser/autocomplete/autocomplete_scheme_classifier_impl.h" |
| 13 |
| 14 class WebOmniboxEditController; |
| 15 |
| 16 namespace ios { |
| 17 class ChromeBrowserState; |
| 18 } |
| 19 |
| 20 class ChromeOmniboxClientIOS : public OmniboxClient { |
| 21 public: |
| 22 ChromeOmniboxClientIOS(WebOmniboxEditController* controller, |
| 23 ios::ChromeBrowserState* browser_state); |
| 24 ~ChromeOmniboxClientIOS() override; |
| 25 |
| 26 // OmniboxClient. |
| 27 std::unique_ptr<AutocompleteProviderClient> CreateAutocompleteProviderClient() |
| 28 override; |
| 29 std::unique_ptr<OmniboxNavigationObserver> CreateOmniboxNavigationObserver( |
| 30 const base::string16& text, |
| 31 const AutocompleteMatch& match, |
| 32 const AutocompleteMatch& alternate_nav_match) override; |
| 33 bool CurrentPageExists() const override; |
| 34 const GURL& GetURL() const override; |
| 35 bool IsLoading() const override; |
| 36 bool IsPasteAndGoEnabled() const override; |
| 37 bool IsInstantNTP() const override; |
| 38 bool IsSearchResultsPage() const override; |
| 39 bool IsNewTabPage(const std::string& url) const override; |
| 40 bool IsHomePage(const std::string& url) const override; |
| 41 const SessionID& GetSessionID() const override; |
| 42 bookmarks::BookmarkModel* GetBookmarkModel() override; |
| 43 TemplateURLService* GetTemplateURLService() override; |
| 44 const AutocompleteSchemeClassifier& GetSchemeClassifier() const override; |
| 45 AutocompleteClassifier* GetAutocompleteClassifier() override; |
| 46 gfx::Image GetIconIfExtensionMatch( |
| 47 const AutocompleteMatch& match) const override; |
| 48 bool ProcessExtensionKeyword(TemplateURL* template_url, |
| 49 const AutocompleteMatch& match, |
| 50 WindowOpenDisposition disposition, |
| 51 OmniboxNavigationObserver* observer) override; |
| 52 void OnInputStateChanged() override; |
| 53 void OnFocusChanged(OmniboxFocusState state, |
| 54 OmniboxFocusChangeReason reason) override; |
| 55 void OnResultChanged(const AutocompleteResult& result, |
| 56 bool default_match_changed, |
| 57 const base::Callback<void(const SkBitmap& bitmap)>& |
| 58 on_bitmap_fetched) override; |
| 59 void OnCurrentMatchChanged(const AutocompleteMatch& match) override; |
| 60 void OnURLOpenedFromOmnibox(OmniboxLog* log) override; |
| 61 void OnBookmarkLaunched() override; |
| 62 void DiscardNonCommittedNavigations() override; |
| 63 const base::string16& GetTitle() const override; |
| 64 gfx::Image GetFavicon() const override; |
| 65 void OnTextChanged(const AutocompleteMatch& current_match, |
| 66 bool user_input_in_progress, |
| 67 base::string16& user_text, |
| 68 const AutocompleteResult& result, |
| 69 bool is_popup_open, |
| 70 bool has_focus) override; |
| 71 void OnInputAccepted(const AutocompleteMatch& match) override; |
| 72 void OnRevert() override; |
| 73 |
| 74 private: |
| 75 WebOmniboxEditController* controller_; |
| 76 ios::ChromeBrowserState* browser_state_; |
| 77 AutocompleteSchemeClassifierImpl scheme_classifier_; |
| 78 |
| 79 DISALLOW_COPY_AND_ASSIGN(ChromeOmniboxClientIOS); |
| 80 }; |
| 81 |
| 82 #endif // IOS_CHROME_BROWSER_UI_OMNIBOX_CHROME_OMNIBOX_CLIENT_IOS_H_ |
OLD | NEW |