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

Unified Diff: components/omnibox/browser/omnibox_edit_model.h

Issue 2048693003: Misc. omnibox cleanup: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: components/omnibox/browser/omnibox_edit_model.h
diff --git a/components/omnibox/browser/omnibox_edit_model.h b/components/omnibox/browser/omnibox_edit_model.h
index de6ff02da4bedd70185ef080522c523a1a475c2d..6c673e5bfed7e494a796bb0e9c418c983f0de0bb 100644
--- a/components/omnibox/browser/omnibox_edit_model.h
+++ b/components/omnibox/browser/omnibox_edit_model.h
@@ -14,6 +14,7 @@
#include "base/strings/string16.h"
#include "base/time/time.h"
#include "components/metrics/proto/omnibox_event.pb.h"
+#include "components/omnibox/browser/autocomplete_controller.h"
#include "components/omnibox/browser/autocomplete_controller_delegate.h"
#include "components/omnibox/browser/autocomplete_input.h"
#include "components/omnibox/browser/autocomplete_match.h"
@@ -23,7 +24,6 @@
#include "ui/gfx/native_widget_types.h"
#include "url/gurl.h"
-class AutocompleteController;
class AutocompleteResult;
class OmniboxClient;
class OmniboxEditController;
@@ -377,7 +377,11 @@ class OmniboxEditModel {
// in progress. This logic should in the future live in
// AutocompleteController but resides here for now. This method is used by
// AutomationProvider::AutocompleteEditIsQueryInProgress.
- bool query_in_progress() const;
+ bool query_in_progress() const { return !autocomplete_controller()->done(); }
+
+ // Returns true if the popup exists and is open. (This is a convenience
+ // wrapper for the benefit of test code, which may not have a popup model.)
+ bool PopupIsOpen() const;
// Called whenever user_text_ should change.
void InternalSetUserText(const base::string16& text);

Powered by Google App Engine
This is Rietveld 408576698