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

Unified Diff: chrome/browser/ui/omnibox/omnibox_view.cc

Issue 287543002: Remove origin chip v1 and "hide on input" v2 behavior. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 7 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 | « chrome/browser/ui/omnibox/omnibox_edit_model.cc ('k') | chrome/browser/ui/toolbar/toolbar_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/omnibox/omnibox_view.cc
diff --git a/chrome/browser/ui/omnibox/omnibox_view.cc b/chrome/browser/ui/omnibox/omnibox_view.cc
index f41f4f50e437dafc257ca446076a2349f3a76a69..983a59e60314f513d66f96cdf7e1a574a7aef565 100644
--- a/chrome/browser/ui/omnibox/omnibox_view.cc
+++ b/chrome/browser/ui/omnibox/omnibox_view.cc
@@ -88,20 +88,15 @@ OmniboxView::~OmniboxView() {
}
void OmniboxView::HandleOriginChipMouseRelease() {
- // HIDE_ON_MOUSE_RELEASE only hides if there isn't any current text in the
- // Omnibox (e.g. search terms).
- if ((chrome::GetOriginChipV2Condition() ==
- chrome::ORIGIN_CHIP_V2_HIDE_ON_MOUSE_RELEASE) &&
- controller()->GetToolbarModel()->GetText().empty()) {
+ // Only hide if there isn't any current text in the Omnibox (e.g. search
+ // terms).
+ if (controller()->GetToolbarModel()->GetText().empty())
controller()->HideOriginChip();
- }
}
void OmniboxView::OnDidKillFocus() {
- if (chrome::ShouldDisplayOriginChipV2() &&
- !model()->user_input_in_progress()) {
+ if (chrome::ShouldDisplayOriginChip() && !model()->user_input_in_progress())
controller()->ShowOriginChip();
- }
}
void OmniboxView::OpenMatch(const AutocompleteMatch& match,
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_edit_model.cc ('k') | chrome/browser/ui/toolbar/toolbar_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698