summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgbillock@chromium.org <gbillock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-13 20:04:37 +0000
committergbillock@chromium.org <gbillock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-13 20:04:37 +0000
commit3eec6321d44a28c70c42a290b8f3a61b34e42845 (patch)
treefbf8292523ebe1dc6ea7e85205e19f2fcfbbe4a0
parent9a72d237330d80648f93b2e466d5027b9ce8bb2a (diff)
downloadchromium_src-3eec6321d44a28c70c42a290b8f3a61b34e42845.zip
chromium_src-3eec6321d44a28c70c42a290b8f3a61b34e42845.tar.gz
chromium_src-3eec6321d44a28c70c42a290b8f3a61b34e42845.tar.bz2
[SiteChip] Don't show bubble in response to location bar LocationIconView in experiment.
Also restricts experiment-on location bar icon to be the page icon. R=msw@chromium.org BUG=315944 Review URL: https://codereview.chromium.org/114723004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240722 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/toolbar/toolbar_model_impl.cc6
-rw-r--r--chrome/browser/ui/views/location_bar/location_icon_view.cc7
2 files changed, 11 insertions, 2 deletions
diff --git a/chrome/browser/ui/toolbar/toolbar_model_impl.cc b/chrome/browser/ui/toolbar/toolbar_model_impl.cc
index 2a45e17..f05d9d2 100644
--- a/chrome/browser/ui/toolbar/toolbar_model_impl.cc
+++ b/chrome/browser/ui/toolbar/toolbar_model_impl.cc
@@ -206,6 +206,12 @@ int ToolbarModelImpl::GetIcon() const {
chrome::DISPLAY_SEARCH_BUTTON_NEVER) ?
IDR_OMNIBOX_SEARCH_SECURED : IDR_OMNIBOX_SEARCH;
}
+
+ // When the site chip experiment is running, the icon in the location bar,
+ // when not the search icon, should be the page icon.
+ if (chrome::ShouldDisplayOriginChip())
+ return GetIconForSecurityLevel(NONE);
+
return GetIconForSecurityLevel(GetSecurityLevel(false));
}
diff --git a/chrome/browser/ui/views/location_bar/location_icon_view.cc b/chrome/browser/ui/views/location_bar/location_icon_view.cc
index 0526b6a..4619426 100644
--- a/chrome/browser/ui/views/location_bar/location_icon_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_icon_view.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/ui/views/location_bar/location_icon_view.h"
#include "base/strings/utf_string_conversions.h"
+#include "chrome/browser/search/search.h"
#include "chrome/browser/ui/views/location_bar/location_bar_view.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -25,11 +26,13 @@ bool LocationIconView::OnMousePressed(const ui::MouseEvent& event) {
}
void LocationIconView::OnMouseReleased(const ui::MouseEvent& event) {
- page_info_helper_.ProcessEvent(event);
+ if (chrome::ShouldDisplayOriginChip())
+ page_info_helper_.ProcessEvent(event);
}
void LocationIconView::OnGestureEvent(ui::GestureEvent* event) {
- if (event->type() == ui::ET_GESTURE_TAP) {
+ if (chrome::ShouldDisplayOriginChip() &&
+ (event->type() == ui::ET_GESTURE_TAP)) {
page_info_helper_.ProcessEvent(*event);
event->SetHandled();
}