| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_CLIENT_H_ | 5 #ifndef COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_CLIENT_H_ |
| 6 #define COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_CLIENT_H_ | 6 #define COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_CLIENT_H_ |
| 7 | 7 |
| 8 #include "components/omnibox/browser/autocomplete_provider_client.h" | 8 #include "components/omnibox/browser/autocomplete_provider_client.h" |
| 9 #include "components/omnibox/browser/omnibox_navigation_observer.h" | 9 #include "components/omnibox/browser/omnibox_navigation_observer.h" |
| 10 #include "components/omnibox/common/omnibox_focus_state.h" | 10 #include "components/omnibox/common/omnibox_focus_state.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 // and an empty icon otherwise. | 90 // and an empty icon otherwise. |
| 91 virtual gfx::Image GetIconIfExtensionMatch( | 91 virtual gfx::Image GetIconIfExtensionMatch( |
| 92 const AutocompleteMatch& match) const; | 92 const AutocompleteMatch& match) const; |
| 93 | 93 |
| 94 // Checks whether |template_url| is an extension keyword; if so, asks the | 94 // Checks whether |template_url| is an extension keyword; if so, asks the |
| 95 // ExtensionOmniboxEventRouter to process |match| for it and returns true. | 95 // ExtensionOmniboxEventRouter to process |match| for it and returns true. |
| 96 // Otherwise returns false. |observer| is the OmniboxNavigationObserver | 96 // Otherwise returns false. |observer| is the OmniboxNavigationObserver |
| 97 // that was created by CreateOmniboxNavigationObserver() for |match|; in some | 97 // that was created by CreateOmniboxNavigationObserver() for |match|; in some |
| 98 // embedding contexts, processing an extension keyword involves invoking | 98 // embedding contexts, processing an extension keyword involves invoking |
| 99 // action on this observer. | 99 // action on this observer. |
| 100 virtual bool ProcessExtensionKeyword(TemplateURL* template_url, | 100 virtual bool ProcessExtensionKeyword(const TemplateURL* template_url, |
| 101 const AutocompleteMatch& match, | 101 const AutocompleteMatch& match, |
| 102 WindowOpenDisposition disposition, | 102 WindowOpenDisposition disposition, |
| 103 OmniboxNavigationObserver* observer); | 103 OmniboxNavigationObserver* observer); |
| 104 | 104 |
| 105 // Called to notify clients that the omnibox input state has changed. | 105 // Called to notify clients that the omnibox input state has changed. |
| 106 virtual void OnInputStateChanged() {} | 106 virtual void OnInputStateChanged() {} |
| 107 | 107 |
| 108 // Called to notify clients that the omnibox focus state has changed. | 108 // Called to notify clients that the omnibox focus state has changed. |
| 109 virtual void OnFocusChanged(OmniboxFocusState state, | 109 virtual void OnFocusChanged(OmniboxFocusState state, |
| 110 OmniboxFocusChangeReason reason) {} | 110 OmniboxFocusChangeReason reason) {} |
| (...skipping 27 matching lines...) Expand all Loading... |
| 138 virtual void OnURLOpenedFromOmnibox(OmniboxLog* log) {} | 138 virtual void OnURLOpenedFromOmnibox(OmniboxLog* log) {} |
| 139 | 139 |
| 140 // Called when a bookmark is launched from the omnibox. | 140 // Called when a bookmark is launched from the omnibox. |
| 141 virtual void OnBookmarkLaunched() {} | 141 virtual void OnBookmarkLaunched() {} |
| 142 | 142 |
| 143 // Discards the state for all pending and transient navigations. | 143 // Discards the state for all pending and transient navigations. |
| 144 virtual void DiscardNonCommittedNavigations() {} | 144 virtual void DiscardNonCommittedNavigations() {} |
| 145 }; | 145 }; |
| 146 | 146 |
| 147 #endif // COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_CLIENT_H_ | 147 #endif // COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_CLIENT_H_ |
| OLD | NEW |