Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(326)

Side by Side Diff: components/omnibox/browser/omnibox_client.h

Issue 1278433002: Eliminate OmniboxMetricsProvider listening to notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@componentize_omnibox
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "components/omnibox/browser/autocomplete_provider_client.h" 9 #include "components/omnibox/browser/autocomplete_provider_client.h"
10 #include "components/omnibox/browser/omnibox_navigation_observer.h" 10 #include "components/omnibox/browser/omnibox_navigation_observer.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 bool has_focus) = 0; 130 bool has_focus) = 0;
131 131
132 // Called when input has been accepted. 132 // Called when input has been accepted.
133 virtual void OnInputAccepted(const AutocompleteMatch& match) = 0; 133 virtual void OnInputAccepted(const AutocompleteMatch& match) = 0;
134 134
135 // Called when the edit model is being reverted back to its unedited state. 135 // Called when the edit model is being reverted back to its unedited state.
136 virtual void OnRevert() = 0; 136 virtual void OnRevert() = 0;
137 137
138 // Called to notify clients that a URL was opened from the omnibox. 138 // Called to notify clients that a URL was opened from the omnibox.
139 // TODO(blundell): Eliminate this method in favor of having all //chrome- 139 // TODO(blundell): Eliminate this method in favor of having all //chrome-
140 // level listeners of the OMNIBOX_OPENED_URL instead observe OmniboxEditModel. 140 // level listeners of the OMNIBOX_OPENED_URL instead either (a) observe
141 // Note that this is not trivial because (a) most of those listeners listen 141 // OmniboxEditModel if they were listening for the notification for a single
142 // for the notification from all Profiles and (b) the notification is also 142 // Profile, or (b) observe OmniboxEventGlobalTracker if they were listening
143 // sent from AutocompleteControllerAndroid, and it's unclear which listeners 143 // for the notification from all Profiles. Note however that (a) in
144 // are also listening from it being sent from there. 144 // particular is not trivial: the notification is also sent from
145 // AutocompleteControllerAndroid, and it's unclear which listeners are also
146 // listening from it being sent from there. For (b) this is not a problem, as
147 // AutocompleteControllerAndroid calls out to OmniboxEventGlobalTracker at the
148 // same time that it sends the notification.
145 virtual void OnURLOpenedFromOmnibox(OmniboxLog* log) = 0; 149 virtual void OnURLOpenedFromOmnibox(OmniboxLog* log) = 0;
146 150
147 // Called when a bookmark is launched from the omnibox. 151 // Called when a bookmark is launched from the omnibox.
148 virtual void OnBookmarkLaunched() = 0; 152 virtual void OnBookmarkLaunched() = 0;
149 153
150 // Discards the state for all pending and transient navigations. 154 // Discards the state for all pending and transient navigations.
151 virtual void DiscardNonCommittedNavigations() = 0; 155 virtual void DiscardNonCommittedNavigations() = 0;
152 }; 156 };
153 157
154 #endif // COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_CLIENT_H_ 158 #endif // COMPONENTS_OMNIBOX_BROWSER_OMNIBOX_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698