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

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_view_views.cc

Issue 731423002: Remove OriginChip code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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: chrome/browser/ui/views/omnibox/omnibox_view_views.cc
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
index f3b39c4accdd4ecb658079120a4b0ae34dd48fc5..4469a87f6029249781a90bfc463ce40c82394869 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -225,7 +225,6 @@ void OmniboxViewViews::Update() {
if (model()->UpdatePermanentText()) {
// Something visibly changed. Re-enable URL replacement.
controller()->GetToolbarModel()->set_url_replacement_enabled(true);
- controller()->GetToolbarModel()->set_origin_chip_enabled(true);
model()->UpdatePermanentText();
// Select all the new text if the user had all the old text selected, or if
@@ -255,8 +254,7 @@ void OmniboxViewViews::Update() {
}
void OmniboxViewViews::UpdatePlaceholderText() {
- if (chrome::ShouldDisplayOriginChip() ||
- OmniboxFieldTrial::DisplayHintTextWhenPossible())
+ if (OmniboxFieldTrial::DisplayHintTextWhenPossible())
set_placeholder_text(GetHintText());
}
@@ -688,8 +686,6 @@ void OmniboxViewViews::OnMouseReleased(const ui::MouseEvent& event) {
// into view and shift the contents jarringly.
SelectAll(true);
}
-
- HandleOriginChipMouseRelease();
}
select_all_on_mouse_release_ = false;
}
@@ -784,9 +780,6 @@ void OmniboxViewViews::OnGestureEvent(ui::GestureEvent* event) {
void OmniboxViewViews::AboutToRequestFocusFromTabTraversal(bool reverse) {
views::Textfield::AboutToRequestFocusFromTabTraversal(reverse);
- // Tabbing into the omnibox should affect the origin chip in the same way
- // clicking it should.
- HandleOriginChipMouseRelease();
}
bool OmniboxViewViews::SkipDefaultKeyEventProcessing(
@@ -843,11 +836,6 @@ void OmniboxViewViews::OnBlur() {
// Tell the model to reset itself.
model()->OnKillFocus();
- // Ignore loss of focus if we lost focus because the website settings popup
- // is open. When the popup is destroyed, focus will return to the Omnibox.
- if (!WebsiteSettingsPopupView::IsPopupShowing())
- OnDidKillFocus();
-
// Make sure the beginning of the text is visible.
SelectRange(gfx::Range(0));
}
@@ -1019,7 +1007,7 @@ void OmniboxViewViews::UpdateContextMenu(ui::SimpleMenuModel* menu_contents) {
menu_contents->AddSeparator(ui::NORMAL_SEPARATOR);
- if (chrome::IsQueryExtractionEnabled() || chrome::ShouldDisplayOriginChip()) {
+ if (chrome::IsQueryExtractionEnabled()) {
int select_all_position = menu_contents->GetIndexOfCommandId(
IDS_APP_SELECT_ALL);
DCHECK_GE(select_all_position, 0);

Powered by Google App Engine
This is Rietveld 408576698