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

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: Resync 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
« no previous file with comments | « components/omnibox/browser/omnibox_controller.cc ('k') | components/omnibox/browser/omnibox_edit_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8fcf79e0d3634e8ef13982ba69bf75b5b3733203..de77a5138b72e1401cffed59e2722712f31cb9f9 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"
@@ -24,7 +25,6 @@
#include "ui/gfx/native_widget_types.h"
#include "url/gurl.h"
-class AutocompleteController;
class AutocompleteResult;
class OmniboxClient;
class OmniboxEditController;
@@ -380,7 +380,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);
« no previous file with comments | « components/omnibox/browser/omnibox_controller.cc ('k') | components/omnibox/browser/omnibox_edit_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698