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

Unified Diff: chrome/browser/ui/cocoa/web_intent_bubble_controller.mm

Issue 8351008: [Mac] Added tooltip support for web intent picker (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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/cocoa/web_intent_bubble_controller.mm
diff --git a/chrome/browser/ui/cocoa/web_intent_bubble_controller.mm b/chrome/browser/ui/cocoa/web_intent_bubble_controller.mm
index ffe455ed222e4203b08cef169686a3b6d0c0770d..e08cc45bf22fb1a803de538f8b9e53f53b94e591 100644
--- a/chrome/browser/ui/cocoa/web_intent_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/web_intent_bubble_controller.mm
@@ -81,6 +81,15 @@ const CGFloat kTextWidth = kWindowWidth - (kImageSize + kImageSpacing +
return self;
}
+- (void)setServiceURLs:(NSArray*)urls {
+ serviceURLs_.reset([urls retain]);
+
+ if ([iconImages_ count] < [serviceURLs_ count])
+ [iconImages_ setCount:[serviceURLs_ count]];
+
+ [self performLayout];
+}
+
- (void)replaceImageAtIndex:(size_t)index withImage:(NSImage*)image {
if ([iconImages_ count] <= index)
[iconImages_ setCount:index + 1];
@@ -232,6 +241,8 @@ const CGFloat kTextWidth = kWindowWidth - (kImageSize + kImageSpacing +
[cell setEnabled:YES];
[matrix putCell:cell atRow:(i / iconsPerRow) column:(i % iconsPerRow)];
+ if (serviceURLs_ && [serviceURLs_ count] >= i)
+ [matrix setToolTip:[serviceURLs_ objectAtIndex:i] forCell:cell];
}
[subviews addObject:matrix];

Powered by Google App Engine
This is Rietveld 408576698