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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 2720183002: [Views] Update ink drop for omnibox icons (Closed)
Patch Set: Removed CanProcessEventsWithinSubtree Created 3 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
Index: chrome/browser/ui/views/location_bar/location_bar_view.cc
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index 284f8672adcee772b35cd6d0e4879e2190544d6c..739de2a076dd938d52136efcf457e4f663147d35 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -679,6 +679,7 @@ void LocationBarView::RefreshLocationIcon() {
: GetSecureTextColor(security_level);
location_icon_view_->SetImage(gfx::CreateVectorIcon(
omnibox_view_->GetVectorIcon(), kIconWidth, icon_color));
+ location_icon_view_->SetEnabled(!omnibox_view_->IsEditingOrEmpty());
}
bool LocationBarView::RefreshContentSettingViews() {
@@ -919,9 +920,10 @@ bool LocationBarView::TestContentSettingImagePressed(size_t index) {
if (index >= content_setting_views_.size())
return false;
- // This up-cast is necessary since the descendant class moved OnKeyPressed
- // to the protected section.
views::View* image_view = content_setting_views_[index];
+ image_view->SetSize(gfx::Size(24, 24));
+ image_view->OnKeyPressed(
+ ui::KeyEvent(ui::ET_KEY_PRESSED, ui::VKEY_SPACE, ui::EF_NONE));
image_view->OnKeyReleased(
ui::KeyEvent(ui::ET_KEY_RELEASED, ui::VKEY_SPACE, ui::EF_NONE));
return true;

Powered by Google App Engine
This is Rietveld 408576698