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

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

Issue 8351008: [Mac] Added tooltip support for web intent picker (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use iterator instead of indexing vector<> 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
« no previous file with comments | « chrome/browser/ui/cocoa/web_intent_bubble_controller.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/web_intent_picker_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/web_intent_picker_cocoa.mm b/chrome/browser/ui/cocoa/web_intent_picker_cocoa.mm
index ff9b467f810f906a6495a54f389cdfae27be5847..5162aad347976d1a6be87e57604df327c9a17844 100644
--- a/chrome/browser/ui/cocoa/web_intent_picker_cocoa.mm
+++ b/chrome/browser/ui/cocoa/web_intent_picker_cocoa.mm
@@ -46,6 +46,17 @@ WebIntentPickerCocoa::WebIntentPickerCocoa(Browser* browser,
}
void WebIntentPickerCocoa::SetServiceURLs(const std::vector<GURL>& urls) {
+ DCHECK(controller_);
+ scoped_nsobject<NSMutableArray> urlArray(
+ [[NSMutableArray alloc] initWithCapacity:urls.size()]);
+
+ for (std::vector<GURL>::const_iterator iter(urls.begin());
+ iter != urls.end(); ++iter) {
+ [urlArray addObject:
+ [NSString stringWithUTF8String:iter->spec().c_str()]];
+ }
+
+ [controller_ setServiceURLs:urlArray];
}
void WebIntentPickerCocoa::SetServiceIcon(size_t index, const SkBitmap& icon) {
« no previous file with comments | « chrome/browser/ui/cocoa/web_intent_bubble_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698