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

Unified Diff: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h

Issue 2381373003: Fixed the issue shows keyword hint when omnibox loses its focus. (Closed)
Patch Set: Created 4 years, 2 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 | « AUTHORS ('k') | chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h
index 1300cc9bd0fefa087e483c08fd2c6d95ccf418bc..a9fc492eaab625625f2a6226940d12eb70444b7f 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h
@@ -22,6 +22,7 @@
#include "components/prefs/pref_member.h"
#include "components/security_state/security_state_model.h"
#include "components/zoom/zoom_event_manager_observer.h"
+#include "components/omnibox/common/omnibox_focus_state.h"
@class AutocompleteTextField;
class CommandUpdater;
@@ -182,6 +183,7 @@ class LocationBarViewMac : public LocationBar,
ToolbarModel* GetToolbarModel() override;
const ToolbarModel* GetToolbarModel() const override;
content::WebContents* GetWebContents() override;
+ void OnFocusChanged(OmniboxFocusState state) override;
bool ShouldShowEVBubble() const;
@@ -267,6 +269,9 @@ class LocationBarViewMac : public LocationBar,
// position the decoration will be drawn at.
void UpdateAccessibilityViewPosition(LocationBarDecoration* decoration);
+ // Returns true when omnibox has focus.
+ bool HasFocus() const;
+
std::unique_ptr<OmniboxViewMac> omnibox_view_;
AutocompleteTextField* field_; // owned by tab controller
@@ -312,6 +317,9 @@ class LocationBarViewMac : public LocationBar,
// Used to change the visibility of the star decoration.
BooleanPrefMember edit_bookmarks_enabled_;
+ // Used to confirm the visibility of the keyword hint decoration.
+ OmniboxFocusState focus_state_;
+
// Indicates whether or not the location bar is currently visible.
bool location_bar_visible_;
@@ -332,7 +340,6 @@ class LocationBarViewMac : public LocationBar,
// Used to schedule a task for the first run info bubble.
base::WeakPtrFactory<LocationBarViewMac> weak_ptr_factory_;
-
DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac);
};
« no previous file with comments | « AUTHORS ('k') | chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698