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

Side by Side Diff: chrome/browser/ui/views/location_bar/location_icon_view.cc

Issue 1947533003: Second try at fixing location bar icon keyboard activation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/location_bar/location_icon_view.h" 5 #include "chrome/browser/ui/views/location_bar/location_icon_view.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/ssl/chrome_security_state_model_client.h" 8 #include "chrome/browser/ssl/chrome_security_state_model_client.h"
9 #include "chrome/browser/ui/view_ids.h" 9 #include "chrome/browser/ui/view_ids.h"
10 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" 10 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } 71 }
72 72
73 OnClickOrTap(event); 73 OnClickOrTap(event);
74 } 74 }
75 75
76 bool LocationIconView::OnMouseDragged(const ui::MouseEvent& event) { 76 bool LocationIconView::OnMouseDragged(const ui::MouseEvent& event) {
77 location_bar_->GetOmniboxView()->CloseOmniboxPopup(); 77 location_bar_->GetOmniboxView()->CloseOmniboxPopup();
78 return false; 78 return false;
79 } 79 }
80 80
81 bool LocationIconView::OnKeyPressed(const ui::KeyEvent& event) {
82 return false;
83 }
84
85 void LocationIconView::OnGestureEvent(ui::GestureEvent* event) { 81 void LocationIconView::OnGestureEvent(ui::GestureEvent* event) {
86 if (event->type() != ui::ET_GESTURE_TAP) 82 if (event->type() != ui::ET_GESTURE_TAP)
87 return; 83 return;
88 OnClickOrTap(*event); 84 OnClickOrTap(*event);
89 event->SetHandled(); 85 event->SetHandled();
90 } 86 }
91 87
92 bool LocationIconView::GetTooltipText(const gfx::Point& p, 88 bool LocationIconView::GetTooltipText(const gfx::Point& p,
93 base::string16* tooltip) const { 89 base::string16* tooltip) const {
94 if (show_tooltip_) 90 if (show_tooltip_)
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 return size; 152 return size;
157 } 153 }
158 154
159 void LocationIconView::SetBackground(bool should_show_ev) { 155 void LocationIconView::SetBackground(bool should_show_ev) {
160 static const int kEvBackgroundImages[] = IMAGE_GRID(IDR_OMNIBOX_EV_BUBBLE); 156 static const int kEvBackgroundImages[] = IMAGE_GRID(IDR_OMNIBOX_EV_BUBBLE);
161 if (should_show_ev) 157 if (should_show_ev)
162 SetBackgroundImageGrid(kEvBackgroundImages); 158 SetBackgroundImageGrid(kEvBackgroundImages);
163 else 159 else
164 UnsetBackgroundImageGrid(); 160 UnsetBackgroundImageGrid();
165 } 161 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698