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

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

Issue 2323973002: Fix tooltip text for ContentSettingImageView. (Closed)
Patch Set: Created 4 years, 3 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/views/location_bar/content_setting_image_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/location_bar/content_setting_image_view.cc
diff --git a/chrome/browser/ui/views/location_bar/content_setting_image_view.cc b/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
index f15561607c140e89d0a707a63aba139c0e8c7231..1456e44979256e2f907497d860844ad9542b7094 100644
--- a/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
+++ b/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
@@ -147,6 +147,12 @@ void ContentSettingImageView::OnGestureEvent(ui::GestureEvent* event) {
event->SetHandled();
}
+bool ContentSettingImageView::GetTooltipText(const gfx::Point& p,
+ base::string16* tooltip) const {
+ tooltip->assign(content_setting_image_model_->get_tooltip());
Peter Kasting 2016/09/08 21:51:50 Nit: Or just *tooltip = content_setting_image_m
Evan Stade 2016/09/09 18:48:01 Done.
+ return !tooltip->empty();
+}
+
void ContentSettingImageView::OnNativeThemeChanged(
const ui::NativeTheme* native_theme) {
if (ui::MaterialDesignController::IsModeMaterial())
@@ -286,5 +292,4 @@ void ContentSettingImageView::OnWidgetVisibilityChanged(views::Widget* widget,
void ContentSettingImageView::UpdateImage() {
SetImage(content_setting_image_model_->GetIcon(GetTextColor()).AsImageSkia());
- image()->SetTooltipText(content_setting_image_model_->get_tooltip());
}
« no previous file with comments | « chrome/browser/ui/views/location_bar/content_setting_image_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698